You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2019/09/18 17:06:00 UTC
[jira] [Resolved] (ARROW-2278) [Python] deserializing Numpy struct
arrays raises
[ https://issues.apache.org/jira/browse/ARROW-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou resolved ARROW-2278.
-----------------------------------
Resolution: Done
This has been fixed in the meantime, not sure in which issue.
> [Python] deserializing Numpy struct arrays raises
> -------------------------------------------------
>
> Key: ARROW-2278
> URL: https://issues.apache.org/jira/browse/ARROW-2278
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.8.0
> Reporter: Antoine Pitrou
> Assignee: Licht Takeuchi
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> {code:python}
> >>> import numpy as np
> >>> dt = np.dtype([('x', np.int8), ('y', np.float32)])
> >>> arr = np.arange(5*10, dtype=np.int8).view(dt)
> >>> pa.deserialize(pa.serialize(arr).to_buffer())
> Traceback (most recent call last):
> File "<ipython-input-13-6810c780d033>", line 1, in <module>
> pa.deserialize(pa.serialize(arr).to_buffer())
> File "serialization.pxi", line 441, in pyarrow.lib.deserialize
> File "serialization.pxi", line 404, in pyarrow.lib.deserialize_from
> File "serialization.pxi", line 257, in pyarrow.lib.SerializedPyObject.deserialize
> File "serialization.pxi", line 174, in pyarrow.lib.SerializationContext._deserialize_callback
> File "/home/antoine/arrow/python/pyarrow/serialization.py", line 44, in _deserialize_numpy_array_list
> return np.array(data[0], dtype=np.dtype(data[1]))
> TypeError: a bytes-like object is required, not 'int'
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)