array-api-tests icon indicating copy to clipboard operation
array-api-tests copied to clipboard

Deprecation warnings from numpy fft

Open asmeurer opened this issue 6 months ago • 0 comments

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.

asmeurer avatar Jan 17 '24 00:01 asmeurer