You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably not surprising; in scipy/scipy#20172 I noticed what looks like a requirement for at least a small copy argument pass-through shim with NumPy main here because of (currently) a single test in SciPy. In that PR I was able to patch similar errors with fairly crude copy=None pass-through type shims, though in this library it may actually need to do something useful (the intended purpose) if the copy arg really needs to be respected I suppose.
============================================================================================ FAILURES =============================================================================================
______________________________________________________________________________ test_dispatch_to_unrecognize_library _______________________________________________________________________________
[gw22] linux -- Python 3.11.2 /home/treddy/python_venvs/py_311_scipy_dev/bin/python
scipy/special/tests/test_support_alternative_backends.py:25: in test_dispatch_to_unrecognize_library
res = f(xp.asarray(x))
f = <function get_array_special_func.<locals>.f at 0x7f404756a2a0>
x = [1, 2, 3]
xp = <module 'array_api_strict' from '/home/treddy/python_venvs/py_311_scipy_dev/lib/python3.11/site-packages/array_api_strict/__init__.py'>
scipy/special/_support_alternative_backends.py:33: in f
array_args = [np.asarray(arg) for arg in array_args]
args = (Array([1, 2, 3], dtype=array_api_strict.int64),)
array_args = (Array([1, 2, 3], dtype=array_api_strict.int64),)
f_scipy = <ufunc 'ndtr'>
kwargs = {}
n_array_args = 1
other_args = ()
xp = <module 'array_api_strict' from '/home/treddy/python_venvs/py_311_scipy_dev/lib/python3.11/site-packages/array_api_strict/__init__.py'>
scipy/special/_support_alternative_backends.py:33: in <listcomp>
array_args = [np.asarray(arg) for arg in array_args]
E TypeError: Array.__array__() got an unexpected keyword argument 'copy'
.0 = <tuple_iterator object at 0x7f4062090cd0>
arg = Array([1, 2, 3], dtype=array_api_strict.int64)
===================================================================================== short test summary info =====================================================================================
FAILED scipy/special/tests/test_support_alternative_backends.py::test_dispatch_to_unrecognize_library - TypeError: Array.__array__() got an unexpected keyword argument 'copy'
The text was updated successfully, but these errors were encountered:
I don't think we can really emulate copy=False in NumPy 1.26, hence the NotImplementedError. If NumPy main now actually supports copy=False we should update that code to pass it through for NumPy >= 2.0.
rgommers
added a commit
to rgommers/array-api-strict
that referenced
this issue
Mar 2, 2024
Should be fixed by gh-12. Since the NumPy change got merged in a way that wasn't backwards-compatible, this is breaking SciPy tests now (and probably tests of other users of this package). Even if that is addressed in NumPy, a missing copy keyword will still emit a warning, which is still going to break the SciPy test suite. So it'd be nice to do a release with this issue fixed very soon.
Probably not surprising; in scipy/scipy#20172 I noticed what looks like a requirement for at least a small
copy
argument pass-through shim with NumPymain
here because of (currently) a single test in SciPy. In that PR I was able to patch similar errors with fairly crudecopy=None
pass-through type shims, though in this library it may actually need to do something useful (the intended purpose) if thecopy
arg really needs to be respected I suppose.The text was updated successfully, but these errors were encountered: