Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
Open
Labels
Description
Describe the issue:
In [3]: import numpy as np ...: np.longdouble(int(10)**int(4301))
raise the following warning
---------------------------------------------------------------------------ValueError Traceback (most recent call last)Cell In[3], line 2 1 import numpy as np----> 2 np.longdouble(int(10)**int(4301))ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit
with the default setting (namelysys.set_int_max_str_digits(4300)
).
Reproduce the code example:
Asabove
Error message:
As above
Python and NumPy Versions:
Python 3.13.1, numpy 2.2.2
Runtime Environment:
doesn't matter
Context for the issue:
In#10723 a function to properly convert Python int to longdouble was implemented, it is correct but slow, and relies on round-trip conversion to decimal. Of course this is to be expected.