TDAmeritrade / stumpy

STUMPY is a powerful and scalable Python library for modern time series analysis
https://stumpy.readthedocs.io/en/latest/
Other
3.68k stars 322 forks source link

Update Code to work with NumPy 2.0 #989

Closed NimaSarajpoor closed 5 months ago

NimaSarajpoor commented 5 months ago

Changes in NumPy 2.0 resulted in error when running test suite in STUMPY.

Example: According to the raised error, np.NINF should be replaced with -np.inf. The exact error message is as follows:

AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.

The code needs to be updated accordingly.

seanlaw commented 5 months ago

@NimaSarajpoor It looks like the change is sufficient to be compatible with NumPy 2.0 and all tests are passing. I am having some trouble getting things to install properly on my Apple M2 (well, things seem to install via conda/mamba but I'm getting some weird errors and only installing via pip resolves the issues). I will work on it but maybe it's just a matter of conda/mamba catching up to the numpy 2.0 changes

seanlaw commented 5 months ago

Alright, everything looks resolved now and we are now numpy 2.0 compatible

NimaSarajpoor commented 5 months ago

@seanlaw Thanks for taking care of it so quickly.

seanlaw commented 5 months ago

I still need to do a bit more testing to be sure