You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alessandro Molina (Jira)" <ji...@apache.org> on 2021/07/13 10:27:00 UTC

[jira] [Commented] (ARROW-12667) [Python] Array from strided numpy array doesn't work

    [ https://issues.apache.org/jira/browse/ARROW-12667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17379809#comment-17379809 ] 

Alessandro Molina commented on ARROW-12667:
-------------------------------------------

I confirmed all occurrences of this problem seem to have been solved by https://issues.apache.org/jira/browse/ARROW-12431 but there wasn't a test covering all possible combination of types and masks, so it was still possible to face regressions. I made a PR to add such a test.

> [Python] Array from strided numpy array doesn't work
> ----------------------------------------------------
>
>                 Key: ARROW-12667
>                 URL: https://issues.apache.org/jira/browse/ARROW-12667
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 4.0.0
>            Reporter: Alessandro Molina
>            Assignee: Alessandro Molina
>            Priority: Major
>
> {code:python}
> nparray = np.array([b"ab", b"cd", b"ef"])
> arrow_array = pa.array(nparray[::2], pa.binary(2))
> assert [b"ab", b"ef"] == arrow_array.to_pylist()
> {code}
> The final result instead will be {{[b'ab', b'cd']}} which didn't deal correctly with the numpy array projection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)