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

WATEX example: Overflow in tanh function #87

Open
MattBrst opened this issue Jan 20, 2025 · 1 comment
Open

WATEX example: Overflow in tanh function #87

MattBrst opened this issue Jan 20, 2025 · 1 comment

Comments

@MattBrst
Copy link

MattBrst commented Jan 20, 2025

I am running the Watex example exactly as provided.

On the Calibrate cell I get the following warning, originating from line 145 of aquifer.py:

RuntimeWarning: overflow encountered in tanh
  dzero = sqrtpSc[0] * np.tanh(sqrtpSc[0])

I end up with a (mathemetically) successful calibration.
Is the RuntimeWarning anything to worry about?

My installation:

TTim version       : 0.7.0
Python version     : 3.12.5
Numpy version      : 1.26.4
Numba version      : 0.60.0
Scipy version      : 1.14.1
Pandas version     : 2.2.2
Matplotlib version : 3.9.2
LmFit version      : 1.3.2
@mbakker7
Copy link
Owner

Thanks for reporting this.
You are not supposed to get an error message. I don't get it on my machine, with a slightly different combination of packages.
It probably means that with your specific combination of packages, the calibration routine takes a slightly different path towards the optimal solution, going through part of parameter space where the np.tanh cannot be computed.

We have encountered some inconsistencies in parameter estimations with different combinations of lmfit/scipy/numpy, as was also reported by others (not using ttim). We are aware of this and are looking for a more permanent solution, but that is not easy, so I am leaving this Issue open for now.

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