Skip to content

Commit

Permalink
TVB-3089 the usage of params local_dict (2nd positional arg) and glob…
Browse files Browse the repository at this point in the history
…al_dict in numexpr.evaluate changed in the latest release 2.8.5
  • Loading branch information
liadomide committed Aug 22, 2023
1 parent 703b503 commit b165ded
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tvb_library/tvb/datatypes/equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ def evaluate(self, var):
product *= i + 1

self.parameters["factorial"] = product
_pattern = RefBase.evaluate(self.equation,
global_dict=self.parameters)
_pattern = super().evaluate(var)
_pattern /= max(_pattern)
_pattern *= self.parameters["a"]
return _pattern
Expand Down Expand Up @@ -472,7 +471,7 @@ def evaluate(self, var):
Generate a discrete representation of the equation for the space
represented by ``var``.
"""
_pattern = RefBase.evaluate(self.equation, global_dict=self.parameters)
_pattern = super().evaluate(var)
_pattern /= max(_pattern)

_pattern *= self.parameters["a"]
Expand Down Expand Up @@ -588,4 +587,4 @@ def evaluate(self, var):
self.parameters["gamma_a_1"] = sp_gamma(self.parameters["a_1"])
self.parameters["gamma_a_2"] = sp_gamma(self.parameters["a_2"])

return RefBase.evaluate(self.equation, global_dict=self.parameters)
return super().evaluate(var)

0 comments on commit b165ded

Please sign in to comment.