Skip to content

TYP: expand_dims shape-typing - #31220

Merged
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/expand_dims
Apr 11, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
jorenham:typing/expand_dims

Conversation

@jorenham

Copy link
Copy Markdown
Member

This adds shape typing overloads for np.expand_dims for {0,1,2}-d input arrays with axis as either an int, empty tuple, 1-tuple, or 2-tuple.

AI Disclosure

N/A

@jorenham jorenham added this to the 2.5.0 Release milestone Apr 11, 2026
@charris
charris merged commit a475fcf into numpy:main Apr 11, 2026
15 checks passed
@charris

charris commented Apr 11, 2026

Copy link
Copy Markdown
Member

Thanks Joren.

@jorenham
jorenham deleted the typing/expand_dims branch April 11, 2026 16:12
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