Closed
Description
master
at aba7d2:
>>> from pandas import lib, np
>>> arr = np.array([2**63], dtype=object)
>>> lib.maybe_convert_numeric(arr, set())
...
OverflowError: Python int too large to convert to C long
At first, I thought the patch would be similar to #14916, but there are several complications here:
- Handling an array with negative and
uint64
values: inmaybe_convert_objects
, we would just returnobject
to avoid data truncation. However, this function currently only returns numeric arrays. And if we do decide to return non-numeric, should we then raise ifcoerce_numeric=True
then? uint64
has no convenientna_value
, so what happens if auint64
is inna_values
?