Skip to content

[Python] pyarrow.array segfaults when passed masked array with shrunken mask #17085

Description

@asfimport
>>> import numpy as np, pyarrow as pa                               
>>> pa.array(np.ma.array([0]))

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.

        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

Reporter: Daniel Nugent / @nugend
Assignee: Daniel Nugent / @nugend

PRs and other links:

Note: This issue was originally created as ARROW-8105. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions