h2020charisma/ramanchada2

check numpy 2.0 compatibility

Closed this issue · 1 comments

AttributeError: np.infty was removed in the NumPy 2.0 release. Use np.inf instead.

in

 ramanchada2\spectrum\calc\central_moments.py", line 11, in <module>
    boundaries=(-np.infty, np.infty), moments=[1, 2, 3, 4], normalize=False

could be other issues as well
https://numpy.org/devdocs/release/2.0.0-notes.html

quick update could be to fix the numpy version to the latest before 2.0 (1.26.4) @kerberizer

The substitution of numpy.infty to numpy.inf was straightforward. After this substitution all tests went OK.
There is different behavior on the random generator states which i didn't find in the provided document.
The random generator states provide ability to chain multiple filters that use random numbers, for example add_baseline and add_gaussian_noise.