`numpy.__array_namespace_info__().dtypes()["float64"] == None` is `True` but `numpy.float64 == None` is `False`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the discrepancy with array_api_compat.numpy.array_namespace_info().dtypes()["float64"] and np.float64, then compare the behavior with the Array API specification linked in the issue. Done means resolving the inconsistent comparison behavior for the NumPy backend and covering the reported case with an appropriate test.
Written by the indexing model from the issue text.
Description
In my understanding, dtype can be any Python object in array API specification, and therefore may be None depending on the library. If the device is somewhat set to None while using numpy backend in array API compatible code, the above specification (https://github.com/numpy/numpy/issues/18434) causes various problems when working with dtypes.
> from array_api_compat import numpy as np
> np.__array_namespace_info__().dtypes()["float64"]
dtype('float64')
> np.float64
<class 'numpy.float64'>
> np.__array_namespace_info__().dtypes()["float64"] == np.float64
True
> np.__array_namespace_info__().dtypes()["float64"] == None
True
> np.float64 == None
False
- Dominant language
- Python
- Stars
- 131
- Forks
- 49
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 6
Contributor guide
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-compat
-
blocked by upstream
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
data-apis/array-api-compat#439 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
data-apis/array-api-compat#395 · 2 comments ·
-
Release 1.16 Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
data-apis/array-api-compat#476 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
data-apis/array-api-compat#473 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
data-apis/array-api-compat#465 · 3 comments ·
All issues in data-apis/array-api-compat
Similar issues
-
area: harness bug status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Human-Agent-Society/reef#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
learningequality/kolibri#15351 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Name consistency Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eellak/triplestore#65 · 1 comment ·