Skip to content

Commit

Permalink
convert java.lang.Double attributes to numeric values
Browse files Browse the repository at this point in the history
  • Loading branch information
billyc committed Mar 22, 2024
1 parent 8f4c7b3 commit 6f92a58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions matsim/Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def read_network(filename, skip_attributes=False):
if 'class' in elem.attrib:
if elem.attrib['class'] == 'java.lang.Long':
atts['value'] = float(elem.text)
if elem.attrib['class'] == 'java.lang.Double':
atts['value'] = float(elem.text)
if elem.attrib['class'] == 'java.lang.Integer':
atts['value'] = int(elem.text)

Expand Down

0 comments on commit 6f92a58

Please sign in to comment.