Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Relax the integer-type-constraint of npt._ShapeLike #18778

Merged
merged 4 commits into from
Apr 15, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Apr 14, 2021

As was noted in scipy/scipy#13833 (comment) the definition of npt._ShapeLike prior to this PR is too strict.

The latter currently demands a builtins.int (or sequence thereof) while the likes of np.integer or,
more generally, objects implementing the __index__ protocol are generally suitable alternatives.

Bas van Beek added 2 commits April 14, 2021 23:09
@charris charris merged commit b7e7544 into numpy:main Apr 15, 2021
@charris
Copy link
Member

charris commented Apr 15, 2021

Thanks Bas.

@BvB93 BvB93 deleted the shapelike branch April 17, 2021 16:41
@BvB93 BvB93 removed the 09 - Backport-Candidate PRs tagged should be backported label May 3, 2021
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.

None yet

2 participants