Description
With NumPy 2.5, numpy.fix is deprecated:
Deprecated since version 2.5: numpy.fix is deprecated. Use numpy.trunc instead, which is faster and follows the Array API standard.
EEGPrep 0.3.0 currently uses np.fix in:
eegprep/plugins/clean_rawdata/private/yulewalk.py:85
stop = int(np.fix(ff[index + 1] * npt))
This emits:
The function "fix" is deprecated
numpy.fix is deprecated. Use numpy.trunc instead.
Proposed change
Replace it with:
stop = int(np.trunc(ff[index + 1] * npt))
np.fix and np.trunc both round towards zero, so this should preserve the current numerical behaviour while removing the warning and maintaining compatibility with future NumPy versions.
Environment
EEGPrep: 0.3.0
NumPy: 2.5.2
Python: 3.12
OS: Windows
Description
With NumPy 2.5,
numpy.fixis deprecated:EEGPrep 0.3.0 currently uses
np.fixin:This emits:
Proposed change
Replace it with:
np.fixandnp.truncboth round towards zero, so this should preserve the current numerical behaviour while removing the warning and maintaining compatibility with future NumPy versions.Environment
EEGPrep: 0.3.0
NumPy: 2.5.2
Python: 3.12
OS: Windows