query: `is_*_namespace`: input must be hashable?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Read array_api_compat/common/helpers.py around lines 190 and 340-341, then check Python's lru_cache hashability requirements for module arguments and the isnamespace and is_array call paths. Done means establishing whether the current casts and cached calls are valid, then documenting the required correction or confirming no change is needed.
Written by the indexing model from the issue text.
Description
The lru_cache docstring says:
Arguments to the cached function must be hashable.
But functions like
take modules as arguments, which are not hashable.
Is this a problem? The is_*_array functions currently cast args to Hashable before calling another lru_cache-wrapped function: https://github.com/data-apis/array-api-compat/blob/946994733b8119b827c878ad71397823245ab75d/array_api_compat/common/_helpers.py#L190-L191
cc @crusaderky
- 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
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100