Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect getitem test? #172

Open
asmeurer opened this issue Feb 25, 2023 · 0 comments
Open

Incorrect getitem test? #172

asmeurer opened this issue Feb 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@asmeurer
Copy link
Member

cupy fails test_getitem with:

E                       AssertionError: out=-0.0, should be 0.0 [__getitem__()]
E                       Falsifying example: test_getitem(
E                           shape=(1,), dtype=numpy.float32, data=data(...),
E                       )
E                       Draw 1 (obj): [-0.0]
E                       x=array([-0.], dtype=float32)
E                       Draw 2 (key): (0,)

It seems like it is saying that asarray([-0.0])[0,] should be 0.0 instead of -0.0. CuPy appears to be correct:

>>> import cupy as cp
>>> cp.array([-0.0], dtype=cp.float32)[0,]
array(-0., dtype=float32)

It's possible I'm misinterpreting the test. The output of the tests when there are data().draw()s isn't always very readable.

@honno honno added the bug Something isn't working label Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@asmeurer @honno and others