You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecations in numpy 2.5 are causing deprecation warnings in write_sofa and read_sofa, this also affects the pyfar tests (pyfar/pyfar#943).
Not sure if we can fix this in our code or if this is an issue with netCDF4.
Warning:
...
sofar/io.py:256: in write_sofa
_write_sofa(filename, sofa, compression, verify=True)
sofar/io.py:331: in _write_sofa
tmp_var[:] = value
^^^^^^^^^^
???
E DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
E As an alternative, you can create a new view using np.reshape (with copy=False if needed).
changed the title [-][MAINT] Numpy 2.5 deprecation warnings in `sofar.write_sofa` and `sofar.read_sofa`[/-][+][MAINT] Numpy 2.5 deprecation warnings causd by netCDF4[/+]on Jun 30, 2026
changed the title [-][MAINT] Numpy 2.5 deprecation warnings causd by netCDF4[/-][+][MAINT] Numpy 2.5 deprecation warnings caused by netCDF4[/+]on Jun 30, 2026
Activity
mberz commentedon Jun 30, 2026
Looks like this might be an issue with how the python wrapper for netCDF implements slicing. Or what type is tmp_var?
hoyer-a commentedon Jun 30, 2026
Yes, it's a
netCDF4.Variable[-][MAINT] Numpy 2.5 deprecation warnings in `sofar.write_sofa` and `sofar.read_sofa`[/-][+][MAINT] Numpy 2.5 deprecation warnings causd by netCDF4[/+][-][MAINT] Numpy 2.5 deprecation warnings causd by netCDF4[/-][+][MAINT] Numpy 2.5 deprecation warnings caused by netCDF4[/+]hoyer-a commentedon Jul 17, 2026
Should be fixed with next netCDF4 release
Unidata/netcdf4-python#1469
[-][MAINT] Numpy 2.5 deprecation warnings caused by netCDF4[/-][+][MAINT] Remove restrcition for Numpy 2.5[/+]f-brinkmann commentedon Aug 27, 2026
We restricted to numpy <2.5.0 to be able to release sofar 1.3.0
Bump numpy from 2.4.2 to 2.5.4
h-chmeruk commentedon Dec 2, 2026
What is the status of the issue?
Is it on hold, is it ready for pickup, is it still under discussion?
hoyer-a commentedon Dec 2, 2026
Implementation in progress, the issue with numpy >= 2.5 is fixed in #149
h-chmeruk commentedon Dec 2, 2026
@hoyer-a, thanks!