Skip to content

TYP: type capabilities max dimensions - #32135

Merged
charris merged 1 commit into
numpy:maintenance/2.5.xfrom
charris:backport-32128
Jul 28, 2026
Merged

TYP: type capabilities max dimensions#32135
charris merged 1 commit into
numpy:maintenance/2.5.xfrom
charris:backport-32128

Conversation

@charris

@charris charris commented Jul 28, 2026

Copy link
Copy Markdown
Member

Backport of #32128.

PR summary

Add type hint for np.__array_namespace_info__().capabilities()["max dimensions"], previously type checkers would flag its use as an invalid key in a TypedDict.

First time committer introduction

I'm a physicist and have been using NumPy for ~10 years during my undergraduate and PhD. I've recently started using type checkers and the array api standard, and noticed this issue, which seems simple to fix so thought I'd contribute it myself.

AI Disclosure

No AI tools used

@charris charris added this to the 2.5.2 release milestone Jul 28, 2026
@charris charris added 08 - Backport Used to tag backport PRs 41 - Static typing labels Jul 28, 2026
@charris
charris merged commit aa5d2bf into numpy:maintenance/2.5.x Jul 28, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 - Backport Used to tag backport PRs 41 - Static typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants