Incorrect getitem test?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with the test_getitem property and reproduce the reported case using shape=(1,), dtype=numpy.float32, data=-0.0, and key=(0,). Determine whether the assertion incorrectly treats -0.0 as unequal to 0.0; done means the test behavior is corrected or the failure is shown to be valid.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 74
- Forks
- 54
- Avg merge
- 4h 35m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from data-apis/array-api-tests
-
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
data-apis/array-api-tests#465 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
data-apis/array-api-tests#460 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
data-apis/array-api-tests#455 · 2 comments ·
-
tracking
Difficulty 5/5 Over a week Newbie friendliness 25/100
data-apis/array-api-tests#381 · 9 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
data-apis/array-api-tests#379 · 10 comments ·
All issues in data-apis/array-api-tests
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100