Skip to content

Commit

Permalink
Merge pull request #400 from ICB-DCM/fix_382
Browse files Browse the repository at this point in the history
Fix(python) Replace logX(.) by log(X,.) in observables during model i…
  • Loading branch information
dweindl authored Aug 13, 2018
2 parents 7153063 + ad205d7 commit 62a8dc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/amici/sbml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,8 @@ 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()
else 'y' + str(index)
Expand Down

0 comments on commit 62a8dc3

Please sign in to comment.