Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Reproducer:
data = [None, [9007199254740993]] arr = pa.array(data, type=pa.list_(pa.uint64(), 1)) ndarray = arr.to_numpy(zero_copy_only=False) restored = pa.array(ndarray, type=arr.type) assert restored.equals(arr)
Error:
E assert False E + where False = <built-in method equals of pyarrow.lib.FixedSizeListArray object at 0x7fbdb0239e20>(<pyarrow.lib.FixedSizeListArray object at 0x7fbdb0262220>\n[\n null,\n [\n 9007199254740993\n ]\n]) E + where <built-in method equals of pyarrow.lib.FixedSizeListArray object at 0x7fbdb0239e20> = <pyarrow.lib.FixedSizeListArray object at 0x7fbdb0239e20>\n[\n null,\n [\n 9007199254740992\n ]\n].equals
The inner numpy array (ndarray[1]) has float64 dtype where the integer gets truncated because of the precision.