Skip to content

TYP: std and var shape-typing and improved dtypes#31154

Merged
charris merged 2 commits into
numpy:mainfrom
jorenham:typing/std
Apr 5, 2026
Merged

TYP: std and var shape-typing and improved dtypes#31154
charris merged 2 commits into
numpy:mainfrom
jorenham:typing/std

Conversation

@jorenham
Copy link
Copy Markdown
Member

@jorenham jorenham commented Apr 4, 2026

This follows #31151, and uses the same overload pattern as for np[.ndarray].mean and applies it to np[.ndarray].std and np[.ndarray].var .

If I have time tomorrow, I'll also use this overload pattern to improve the other similar aggregation functions: sum, prod, amax, amin, and ptp.

I'm also planning to write a release note that summarizes the shape-typing improvements sometime soon (in a separate PR).

AI Disclosure

N/A

@jorenham jorenham added this to the 2.5.0 Release milestone Apr 4, 2026
@charris charris merged commit 5af314d into numpy:main Apr 5, 2026
15 checks passed
@charris
Copy link
Copy Markdown
Member

charris commented Apr 5, 2026

Thanks Joren.

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