Closed jrbourbeau closed 2 months ago
Looks like there was a change in how np.real
is handled in __array_function__
dispatching. Previously we had (with the 0.15.1 release)
In [1]: import sparse
In [2]: import numpy as np
In [3]: sparse.real is np.real
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 sparse.real is np.real
AttributeError: module 'sparse' has no attribute 'real'
Now we have (with the latest 0.15.2 release)
In [1]: import sparse
In [2]: import numpy as np
In [3]: sparse.real is np.real
Out[3]: True
which seems to be why we're getting the infinite recursion
Thanks for the report. I think I missed a commit or two when cherry picking.
This was fixed by https://github.com/pydata/sparse/commit/32d9f80a22b2c0ac0fd017cf3bd226140221a1ec. 0.15.3 is up on PyPI, and will soon also be on conda-forge
.
Thanks @hameerabbasi
Describe the bug The Dask test suite turned up a
RecursionError
with the recent 0.15.2 releaseTo Reproduce
Here's an MRE:
Expected behavior
With the 0.15.1 release the above snippet outputs (expected)
but with the 0.15.2 release we get this error