Skip to content

Commit

Permalink
Remove stochkit initial condition support for numeric ICs
Browse files Browse the repository at this point in the history
Raw numeric intial conditions, as opposed to those wrapped in a
parameter or constant expression, are not allowed in PySB.
This removes a superfluous check for this condition in the
StochKit exporter.
  • Loading branch information
alubbock committed Jan 9, 2019
1 parent 3f65185 commit 2848add
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pysb/export/stochkit.py
Expand Up @@ -165,9 +165,7 @@ def export(self, initials=None, param_values=None):
if si is None: if si is None:
raise IndexError("Species not found in model: %s" % raise IndexError("Species not found in model: %s" %
repr(cp)) repr(cp))
if isinstance(value_obj, (int, float)): if value_obj in self.model.parameters:
value = value_obj
elif value_obj in self.model.parameters:
pi = self.model.parameters.index(value_obj) pi = self.model.parameters.index(value_obj)
value = param_values[pi] value = param_values[pi]
elif value_obj in self.model.expressions: elif value_obj in self.model.expressions:
Expand Down

0 comments on commit 2848add

Please sign in to comment.