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

Skip to content

TYP: fix NDArray[floating] + float return type #28807

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

jorenham
Copy link
Member

Closes #28805

@jorenham
Copy link
Member Author

Should I label this as backport candidate, or are there no 2.2.6 plans?

Copy link

Diff from mypy_primer, showing the effect of this PR on type check results on a corpus of open source code:

vision (https://github.com/pytorch/vision)
- torchvision/utils.py:270: error: Unused "type: ignore" comment  [unused-ignore]

@jorenham
Copy link
Member Author

the mypy_primer diff for torchvision is irrelevant

@charris
Copy link
Member

charris commented Apr 24, 2025

or are there no 2.2.6 plans

2.2.6 plans are ... undecided. Go ahead and mark it.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Apr 24, 2025
@charris charris merged commit 5570e92 into numpy:main Apr 24, 2025
76 checks passed
@charris
Copy link
Member

charris commented Apr 24, 2025

Thanks Joren.

@jorenham jorenham deleted the typing/fix-28805 branch April 24, 2025 21:14
@jorenham
Copy link
Member Author

or are there no 2.2.6 plans

2.2.6 plans are ... undecided. Go ahead and mark it.

For what it's worth; judging by the lack of mypy_primer diffs, I don't consider this to be a high-priority fix.

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: mypy infers that adding/multiplying a npt.NDArray[np.float32] with a float promotes dtype to Any or np.float64
2 participants