Open Dr-Irv opened 6 months ago
I think what's happening internally is that the values in the PeriodArray
are converted to int64 values to perform some calculations, and NaT
gets converted to a very big value (largest int64 number I think), and then it does some multiplication which will result in overflow for this NaT
(2^63
), which doesn't really affect anything as that value gets masked right after the multiplication, but the warning is quite misleading.
I think we can solve this by either performing the masking before doing the multiplication, or by doing the multiplication for all non-NaT values.
But I don't know why it happens for Windows only
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
This error only appears on Windows, not on Linux!
Discovered in a
pandas-stubs
pull request: https://github.com/pandas-dev/pandas-stubs/pull/907/files#r1571049325Expected Behavior
No error message
Installed Versions