Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TYP: allow inplace division ofNDArray[timedelta64] by floats#28994

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jorenham
Copy link
Member

@jorenhamjorenham commentedMay 17, 2025
edited
Loading

this fixes the following valid example from being falsely rejected by static type checkers

importnumpyasnpa=np.array([0,None],np.timedelta64)a.__itruediv__(3.14)a.__ifloordiv__(3.14)

This was typed correctly in the__{true,floor}div__ methods, which apparently made it so thata /= 3.14 anda /= 3.14 already was accepted. So that's probably why this issue wasn't noticed before.

@jorenhamjorenham added this to the2.3.0 release milestoneMay 17, 2025
@charrischarris merged commitc2d5e00 intonumpy:mainMay 19, 2025
77 checks passed
@charris
Copy link
Member

Thanks Joren.

jorenham reacted with thumbs up emoji

@jorenhamjorenham deleted the typing/ndarray-timedelta64-idiv branchMay 19, 2025 18:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
2.3.0 release
Development

Successfully merging this pull request may close these issues.

2 participants
@jorenham@charris

[8]ページ先頭

©2009-2025 Movatter.jp