Skip to content

TYP: single-operand nditer should accept nested op_flags - #31915

Merged
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/nditer-nested-op_flags
Jul 8, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
jorenham:typing/nditer-nested-op_flags

Conversation

@jorenham

@jorenham jorenham commented Jul 8, 2026

Copy link
Copy Markdown
Member

At runtime you can do

In [1]: np.nditer(np.array([1,2,3]), op_flags=[["readwrite"]])
Out[1]: <numpy.nditer at 0x72bd5f5ba790>

but the stubs rejected this.


Fully written by me (a human); bug found by Claude Fable 5 (here's the full (second) audit for those interested).

(more stub fixes on the way)

@jorenham jorenham added 09 - Backport-Candidate PRs tagged should be backported 41 - Static typing labels Jul 8, 2026
@charris
charris merged commit 06ec7d7 into numpy:main Jul 8, 2026
14 checks passed
@charris

charris commented Jul 8, 2026

Copy link
Copy Markdown
Member

Thanks Joren.

@jorenham
jorenham deleted the typing/nditer-nested-op_flags branch July 8, 2026 12:40
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 8, 2026
jorenham added a commit that referenced this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants