You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Daniel Nugent (Jira)" <ji...@apache.org> on 2020/03/13 01:41:00 UTC

[jira] [Created] (ARROW-8105) [Python] pyarrow.array segfaults when passed masked array with shrunken mask

Daniel Nugent created ARROW-8105:
------------------------------------

             Summary: [Python] pyarrow.array segfaults when passed masked array with shrunken mask
                 Key: ARROW-8105
                 URL: https://issues.apache.org/jira/browse/ARROW-8105
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: Daniel Nugent


{code:python}
>>> import numpy as np, pyarrow as pa                               
>>> pa.array(np.ma.array([0]))
{code}

I *think* the issue might be here because when the masked array has a shrunken mask, it's values is False rather than the boolean mask array.
{code:python}
        if isinstance(values, np.ma.MaskedArray):
            if mask is not None:
                raise ValueError("Cannot pass a numpy masked array and "
                                 "specify a mask at the same time")
            else:
                mask = values.mask
                values = values.data
{code}



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