Numpy 2.0 deprecations
Further to #5 and #6 np.complex_ deprecation needs correctly handling such as to maintain backwards compatibility as it throws up errors when run with newer versions of Numpy...
File "/Users/sylvi/.pyenv/versions/3.11.9/envs/topostats/lib/python3.11/site-packages/numpyencoder/numpyencoder.py", line 31, in default
elif isinstance(obj, (np.complex_, np.complex64, np.complex128)):
^^^^^^^^^^^
File "/Users/sylvi/.pyenv/versions/3.11.9/envs/topostats/lib/python3.11/site-packages/numpy/__init__.py", line 400, in __getattr__
raise AttributeError(
AttributeError: `np.complex_` was removed in the NumPy 2.0 release. Use `np.complex128` instead.
Removing it completely as per #6 would, as noted, break backwards compatibility of numpyencoder.
I've never had to deal with such deprecations and maintaining backwards compatibility before but please let me know if there is anything I can do to help.
Just ran into this issue, I guess this hasn't been fixed yet? Is there anyway around this other than just not using the numpyencoder?
ran into this issue too. Not sure what to do next.
@JonahDW and @tatianaanthony I'm merging a fix that solves this for all NumPy versions now and should have a new package available for upgrade shortly after. Sorry this has caused an issue for you.
Issue has been fixed in v0.3.2 and published to pypi.