[MAINT] Remove restrcition for Numpy 2.5
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 56/100
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.
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
- Dominant language
- Python
- Stars
- 37
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from pyfar/sofar
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
invalid SOFA files for UTF-8 stringsPossibly taken @f-brinkmann claimed this 28 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Move sofar-related pyfar functionality to sofarMay be free again @f-brinkmann claimed this 92 days ago, and no pull request is open. Openfeature
-
Move to h5netcdfMay be free again @hoyer-a claimed this 127 days ago, and no pull request is open. Openenhancement
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kludex/python-multipart#375 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 3 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 11 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
FuRongJun-1999/dsh-memory#1000 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gcivil-nyu-org/team5-mon-fall26#154 ·
Maintainers usually reply within 1 day