[MAINT] Remove restrcition for Numpy 2.5
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34
- Forks
- 4
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
Deprecations in numpy 2.5 are causing deprecation warnings in write_sofa and read_sofa, this also affects the pyfar tests (https://github.com/pyfar/pyfar/issues/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).src/netCDF4/_netCDF4.pyx:5616: DeprecationWarning
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in sofar/io.py at write_sofa and _write_sofa, especially the tmp_var[:] = value path shown in the warning. Reproduce the affected SOFA I/O or pyfar tests with NumPy 2.5 and determine whether the warning comes from sofar or netCDF4. Done means the NumPy 2.5 restriction is removed and the affected tests pass without the deprecation warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- backend, data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100