Description
`coordination_number()` in `analysis/scripts/analyze_hydration.py:147` calls `np.trapz`, which was deprecated in NumPy 2.0 and emits a `DeprecationWarning` in 2.1+. NumPy intends to remove the alias in a future release, at which point this script will hard-fail with `AttributeError: module 'numpy' has no attribute 'trapz'`.
Reproduction
On any environment with NumPy ≥ 2.0:
```python
import numpy as np
np.trapz([0, 1, 4, 9], [0, 1, 2, 3])
DeprecationWarning: 'trapz' is deprecated. Use 'trapezoid' instead.
```
The SURF environment ships NumPy 2.x via the conda env file, so this will surface as soon as anyone runs the analysis.
Expected
Use `np.trapezoid` (available in NumPy ≥ 2.0). For backwards compatibility with NumPy 1.x environments, fall back via `getattr(np, 'trapezoid', np.trapz)`.
Location
`analysis/scripts/analyze_hydration.py:147`
Description
`coordination_number()` in `analysis/scripts/analyze_hydration.py:147` calls `np.trapz`, which was deprecated in NumPy 2.0 and emits a `DeprecationWarning` in 2.1+. NumPy intends to remove the alias in a future release, at which point this script will hard-fail with `AttributeError: module 'numpy' has no attribute 'trapz'`.
Reproduction
On any environment with NumPy ≥ 2.0:
```python
import numpy as np
np.trapz([0, 1, 4, 9], [0, 1, 2, 3])
DeprecationWarning: 'trapz' is deprecated. Use 'trapezoid' instead.
```
The SURF environment ships NumPy 2.x via the conda env file, so this will surface as soon as anyone runs the analysis.
Expected
Use `np.trapezoid` (available in NumPy ≥ 2.0). For backwards compatibility with NumPy 1.x environments, fall back via `getattr(np, 'trapezoid', np.trapz)`.
Location
`analysis/scripts/analyze_hydration.py:147`