Skip to content

Commit

Permalink
Fix(python) Replace logX(.) by log(X,.) in observables during model i…
Browse files Browse the repository at this point in the history
…mport (Fixes #382)
  • Loading branch information
dweindl committed Aug 13, 2018
1 parent f18ae8b commit ad205d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/amici/sbml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ def computeModelEquationsObjectiveFunction(self, observables={}, sigmas={}):

# add user-provided observables or make all species observable
if(observables):
# Replace logX(.) by log(X,.) since symengine cannot parse the former
observables = { key: re.sub(r'(^|\W)log(\d+)\(', r'\1log(\2, ', formula) for key, formula in observables.items() }
self.observables = sp.DenseMatrix([observables[observable]['formula'] for observable in observables])
observableNames = [observables[observable]['name'] if 'name' in observables[observable].keys()
Expand Down

0 comments on commit ad205d7

Please sign in to comment.