You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
;tldr Overflow is detected for the falsifiying example above on native Linux as well.
pandas testsuite uses hypothesis, which provides decorators for property based testing.
Recently there has been a code change in hypothesis which generates larger boundary values.
This is causing some pandas tests to overflow.
Output on linux for equivalent code -
root@76e5635496f5:/# python3
Python 3.9.13 (main, Aug 2 2022, 11:20:39)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> val = 9223286400000000001
>>>
>>> from pandas import Timedelta
>>> import numpy as np
>>> val2 = np.int64(val)
>>> val2
9223286400000000001
>>> def ceil_fun(val):
... val2 = np.int64(val)
... td = Timedelta(val2)
... print(val)
... res = Timedelta.ceil(td, "D")
... print(res)
...
>>>
>>> ceil_fun(100)
100
1 days 00:00:00
>>> ceil_fun(9223286400000000001)
9223286400000000001
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 5, in ceil_fun
File "pandas/_libs/tslibs/timedeltas.pyx", line 1439, in pandas._libs.tslibs.timedeltas.Timedelta.ceil
File "pandas/_libs/tslibs/timedeltas.pyx", line 1397, in pandas._libs.tslibs.timedeltas.Timedelta._round
File "pandas/_libs/tslibs/fields.pyx", line 724, in pandas._libs.tslibs.fields.round_nsint64
File "pandas/_libs/tslibs/fields.pyx", line 688, in pandas._libs.tslibs.fields._ceil_int64
OverflowError: Python int too large to convert to C long
These tests failed with the same errors
PR #1390 avoids this by pinning hypothesis python package.
The text was updated successfully, but these errors were encountered: