Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math domain error #135

Open
FabricioS opened this issue Oct 24, 2018 · 1 comment
Open

math domain error #135

FabricioS opened this issue Oct 24, 2018 · 1 comment

Comments

@FabricioS
Copy link
Contributor

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 ?

@dionperd
Copy link

dionperd commented Aug 3, 2021

Similar problems for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants