jorisvandenbossche commented on issue #26199:
URL: https://github.com/apache/arrow/issues/26199#issuecomment-1481087086
Actually, my example with non-nested data fails on the NaN value, not the
truncated number. So here it's just because of the inherent truncation in
converting to float. Allowing the NaN to be converted to null with
`from_pandas=True`:
```
data = [None, 9007199254740993]
arr = pa.array(data, type=pa.uint64())
ndarray = arr.to_numpy(zero_copy_only=False)
restored = pa.array(ndarray, type=arr.type, from_pandas=True)
>>> restored
<pyarrow.lib.UInt64Array object at 0x7fa7398c1ac0>
[
null,
9007199254740992
]
```
You have the same issue for non-nested data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]