Skip to content

Commit

Permalink
Remove stochkit initial condition support for numeric ICs (#405)
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 Feb 19, 2019
1 parent 8ebf62c commit 0f24ce8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pysb/export/stochkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ def export(self, initials=None, param_values=None):
if si is None:
raise IndexError("Species not found in model: %s" %
repr(cp))
if isinstance(ic.value, (int, float)):
value = ic.value
elif ic.value in self.model.parameters:
if ic.value in self.model.parameters:
pi = self.model.parameters.index(ic.value)
value = param_values[pi]
elif ic.value in self.model.expressions:
Expand Down

0 comments on commit 0f24ce8

Please sign in to comment.