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 2018/02/19 12:06:01 UTC

[jira] [Created] (ARROW-2172) [Python] Incorrect conversion from Numpy array when stride % itemsize != 0

Antoine Pitrou created ARROW-2172:
-------------------------------------

             Summary: [Python] Incorrect conversion from Numpy array when stride % itemsize != 0
                 Key: ARROW-2172
                 URL: https://issues.apache.org/jira/browse/ARROW-2172
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
    Affects Versions: 0.8.0
            Reporter: Antoine Pitrou
            Assignee: Antoine Pitrou


In the example below, the input array has a stride that's not a multiple of the itemsize:

{code:python}
>>> data = np.array([(42, True), (43, False)],
...:                dtype=[('x', np.int32), ('y', np.bool_)])
...:                
...:                                        
>>> data['x']
array([42, 43], dtype=int32)
>>> pa.array(data['x'], type=pa.int32())
<pyarrow.lib.Int32Array object at 0x7ff60a8415e8>
[
  42,
  11009
]
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)