data-apis / array-api-tests

Test suite for the PyData Array APIs standard
https://data-apis.org/array-api-tests/
MIT License
64 stars 41 forks source link

Deprecation warnings from numpy fft #230

Open asmeurer opened 9 months ago

asmeurer commented 9 months ago

The numpy.array_api has several test failures due to https://github.com/data-apis/array-api/pull/720. But additionally, there are also these warnings, which should be looked into:

array_api_tests/test_fft.py::test_fftn
  /Users/aaronmeurer/Documents/numpy/numpy/fft/_pocketfft.py:857: DeprecationWarning: `axes` should not be `None` if `s` is not `None` (Deprecated in NumPy 2.0). In a future version of NumPy, this will raise an error and `s[i]` will correspond to the size along the transformed axis specified by `axes[i]`. To retain current behaviour, pass a sequence [0, ..., k-1] to `axes` for an array of dimension k.
    return _raw_fftnd(a, s, axes, fft, norm)

array_api_tests/test_fft.py: 16 warnings
  /Users/aaronmeurer/Documents/numpy/numpy/array_api/fft.py:190: DeprecationWarning: `axes` should not be `None` if `s` is not `None` (Deprecated in NumPy 2.0). In a future version of NumPy, this will raise an error and `s[i]` will correspond to the size along the transformed axis specified by `axes[i]`. To retain current behaviour, pass a sequence [0, ..., k-1] to `axes` for an array of dimension k.
    res = Array._new(np.fft.irfftn(x._array, s=s, axes=axes, norm=norm))

We should also double check if the standard is correct here.