asarray() copy flag and buffer protocol inputs are not sufficiently tested
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Search for the existing asarray tests and read their copy-flag cases first. Add coverage for scalar and sequence built-ins plus standard-library array.array buffer inputs, checking the stated copy=False behavior, then run the relevant asarray test target.
Written by the indexing model from the issue text.
Description
The asarray test seems to only test the copy flag for array inputs. But it should also work for Python built-in (scalar or sequence) and buffer protocol inputs. copy=False should always error for Python built-ins, and it should always work for buffer protocol.
Actually, buffer protocol inputs for asarray don't seem to be tested either. A simple way to test this would be to use array objects from the Python standard library array module (as confusing as that is). Or we could use the new Python buffer types, but those are Python 3.12-only.
See also https://github.com/data-apis/array-api-strict/pull/15
- Dominant language
- Python
- Stars
- 74
- Forks
- 54
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 6
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
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Diaoul/subliminal#1382 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100