pydstool icon indicating copy to clipboard operation
pydstool copied to clipboard

math domain error

Open FabricioS opened this issue 6 years ago • 1 comments

Hi, I am trying to use PyCont for a model that contains sqrt terms. For some reason, the radicand may become negative, and PyCont then throws a ValueError «math domain error». As far as I understand, the "sqrt" word in the model specification is converted to the sqrt function from the math python package (see protected_mathnames defined in parseUtils.py), and that function does not allow negative radicand (to guarantee that the result is real).

Would it be possible to change the assignment and use either sqrt from numpy or cmath ? I tried to manually force to numpy.sqrt without success. Any idea ?

FabricioS avatar Oct 24 '18 21:10 FabricioS

Similar problems for me.

dionperd avatar Aug 03 '21 13:08 dionperd