Closed rgommers closed 3 years ago
https://github.com/numpy/numpy/commit/d18083bbf97e9b8cf353a046517d08686b8aaf03 fails and https://github.com/numpy/numpy/commit/a7e121720837754010e33cdefc6bb27dc5fd7459 (the commit before it passes), so the culprit seems to be https://github.com/numpy/numpy/pull/18987 (which indeed looks plausible).
Here's a simple standalone test to run for debugging:
from numpy import array
from scipy import signal
from numpy.testing import assert_array_almost_equal
g = array([[5, 6, 4, 3],
[3, 5, 6, 2],
[2, 3, 5, 6],
[1, 6, 9, 7]], 'd')
h = array([[2.16374269, 3.2222222222, 2.8888888889, 1.6666666667],
[2.666666667, 4.33333333333, 4.44444444444, 2.8888888888],
[2.222222222, 4.4444444444, 5.4444444444, 4.801066874837],
[1.33333333333, 3.92735042735, 6.0712560386, 5.0404040404]])
assert_array_almost_equal(signal.wiener(g), h, decimal=6)
I will check the code, but the change were only on PyArray_ITER_GOTO1D and PyArray_NeighborhoodIterNew.
The changes didn't break anything on the Neighborhood tests in numpy. I will get back to you.
Reverting was the right call, the fix on PyArray_ITER_GOTO1D
was correct. Calling it from PyArray_NeighborhoodIterNew wasn't.
Thanks for the quick investigation @ReallyNiceGuy, much appreciated!
I'll close this issue then.
This came in a couple of days ago in the Python 3.0 nightly CI job, but it's in NumPy main - I can reproduce it with Python 3.8. There's a bunch of failures:
Full CI log: