diff --git a/python/sdist/amici/sbml_import.py b/python/sdist/amici/sbml_import.py index d37cc7b9c0..8c43d35cf2 100644 --- a/python/sdist/amici/sbml_import.py +++ b/python/sdist/amici/sbml_import.py @@ -1060,7 +1060,7 @@ def _process_parameters( for par in settings["var"]: self.symbols[partype][_get_identifier_symbol(par)] = { "name": par.getName() if par.isSetName() else par.getId(), - "value": par.getValue(), + "value": sp.Float(par.getValue()), } # Parameters that need to be turned into expressions @@ -1382,13 +1382,13 @@ def _convert_event_assignment_parameter_targets_to_species(self): ia_init = self._get_element_initial_assignment(par.getId()) parameter_def = { "name": par.getName() if par.isSetName() else par.getId(), - "value": par.getValue() if ia_init is None else ia_init, + "value": sp.Float(par.getValue()) if ia_init is None else ia_init, } # Fixed parameters are added as species such that they can be # targets of events. self.symbols[SymbolId.SPECIES][parameter_target] = { "name": parameter_def["name"], - "init": sp.Float(parameter_def["value"]), + "init": parameter_def["value"], # 'compartment': None, # can ignore for amounts "constant": False, "amount": True,