More strict type checking
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- developer-experience
Research direction
Start by reviewing the array API functions and their existing type signatures to determine how inputs are currently validated. Compare possible explicit-checking approaches and define what consistent, actionable errors should look like before deciding whether the work can be automated.
Written by the indexing model from the issue text.
Description
In numpy.array_api, we said that type checking that inputs were Array was too much overhead, and we would just rely on the the type signatures and type checking to do this.
However, given that we are no longer thinking of this library as something that is used in production, I don't think we need to worry so much about the overhead of type checking. It might be a good idea to add explicit type checks to functions. This would prevent a sufficiently duck-typed object from silently passing through, although that's pretty unlikely since basically every function uses x._array on its input. The real reason would be to provide better error messages that AttributeError on bad inputs.
Maybe this can be done automatically from the type signatures using one of those fancy libraries I know nothing about.
- Dominant language
- Python
- Stars
- 34
- Forks
- 14
- Avg merge
- 3m
- 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-strict
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
data-apis/array-api-strict#239 · 3 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
data-apis/array-api-strict#245 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
data-apis/array-api-strict#188 · 5 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
data-apis/array-api-strict#168 · 11 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
data-apis/array-api-strict#128 · 3 comments ·
All issues in data-apis/array-api-strict
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·