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
@asmeurer noted in #110 (comment) that NumPy proper (i.e. numpy, as opposed to numpy.array_api) wasn't working with the test suite due to the following code. The problem was that the dtype attribute of NumPy-proper arrays were being used in conjuction with namespaced dtypes—these two are different objects, and thus have different hashes so they look like different keys in a dict.
Could also be something to fix upstream. Technically a == b should imply hash(a) == hash(b), so NumPy isn't really following Python standard practices here.
I found numpy/numpy#17864 which seems to be about this. Making the change here is still a good idea because the spec doesn't require hashing to begin with.
@asmeurer noted in #110 (comment) that NumPy proper (i.e.
numpy
, as opposed tonumpy.array_api
) wasn't working with the test suite due to the following code. The problem was that the dtype attribute of NumPy-proper arrays were being used in conjuction with namespaced dtypes—these two are different objects, and thus have different hashes so they look like different keys in adict
.This behaviour is isn't specifically ruled out in the spec, as the spec only says dtypes need equality, which NumPy-proper does conform to.
So the test suite should phase out assumptions of namespaced dtypes and array dtypes sharing the same hash, instead relying on equality.
The text was updated successfully, but these errors were encountered: