From 6f92a588d4d5a6b69b7ead2b271d9d3db7a9a5a3 Mon Sep 17 00:00:00 2001 From: Billy Charlton Date: Fri, 22 Mar 2024 18:21:34 +0100 Subject: [PATCH] convert java.lang.Double attributes to numeric values --- matsim/Network.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matsim/Network.py b/matsim/Network.py index 3d3d3a2..5f4d032 100644 --- a/matsim/Network.py +++ b/matsim/Network.py @@ -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)