Reflected arithmetic binary ops don't accept `list` array-likes
Open
Nobody has claimed this yet.
numpy.generic
stubs: Incomplete
- Dominant language
- Python
- Stars
- 79
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
e.g. [2] / np.float64(1) is rejected by type-checkers, but accepted at runtime.
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.
Research direction
Start by locating the reflected arithmetic operator annotations for NumPy scalar types and the type-checker tests covering array-like operands. Reproduce the [2] / np.float64(1) example, then update the relevant typing behavior so the accepted runtime case is accepted by type-checkers and add or adjust a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100