Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jorenham
Copy link
Member

closes #28736

@charris charris merged commit 19a5c6d into numpy:main Apr 16, 2025
74 checks passed
@charris
Copy link
Member

charris commented Apr 16, 2025

Thanks Joren.

I'm a bit curious about np.bool, which isn't an integer type?

@jorenham
Copy link
Member Author

I'm a bit curious about np.bool, which isn't an integer type?

Yea that's a weird one:

>>> import numpy as np
>>> rng = np.random.default_rng()
>>> rng.integers(0, 2, dtype=np.bool)
np.True_
>>> rng.integers(0, 2, dtype=np.bool)
np.False_

I can imagine this being useful, so it should probably be allowed in the stubs as well.

@jorenham jorenham deleted the typing/fix-28736 branch April 16, 2025 23:19
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 19, 2025
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.

TYP: np.random.Generator.integers has incorrect return type int for overload
2 participants