Skip to content

Commit

Permalink
Merge pull request #689 from the-virtual-brain/TVB-3089
Browse files Browse the repository at this point in the history
TVB-3089 Compatibility with latest numexpr
  • Loading branch information
liadomide authored Aug 22, 2023
2 parents 703b503 + b165ded commit b38b884
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 b38b884

Please sign in to comment.