MITHaystack / digital_rf

Read, write, and interact with data in the Digital RF and Digital Metadata formats
Other
97 stars 30 forks source link

PyPI release: `numpy` v2 compatible #62

Open lucaspar opened 3 weeks ago

lucaspar commented 3 weeks ago

Hi @ryanvolz, just checking if we can expect a numpy v2 compatible release on PyPI soon.

I'm getting the following import error so far. It seems the conda release might work right now, but a PyPI release would let us use digital-rf with several other package managers.

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "/home/user/drf-demo/digitalrf_demo.py", line 7, in <module>
    import digital_rf as drf
  File "/home/user/drf-demo/.venv/lib/python3.12/site-packages/digital_rf/__init__.py", line 7, in <module>
    from .digital_rf_hdf5 import *  # noqa: F401,F403
  File "/home/user/drf-demo/.venv/lib/python3.12/site-packages/digital_rf/digital_rf_hdf5.py", line 36, in <module>
    from . import _py_rf_write_hdf5, digital_metadata, list_drf
Traceback (most recent call last):
  File "/home/user/drf-demo/.venv/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
    raise ImportError(msg)
ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.