Skip to content

BUG: MaskedArray inappropriate "setting an array element with a sequence" #8510

Closed
@eric-wieser

Description

@eric-wieser

A worse version of #8461

Obvious bug with scalar arrays:

>>> mask_0d = np.ma.masked_array(1, mask=True)
>>> arr = np.ma.arange(5)
>>> arr[0] = mask_0d
ValueError: setting an array element with a sequence.

More of a missing feature of list conversion:

>>> arr = np.ma.arange(5)
>>> arr[1:3] = [1, np.ma.masked]
ValueError: setting an array element with a sequence.

#expected result:
>>> arr
masked_array(data = [0 1 -- 3 4],
             mask = [False False  True False False],
       fill_value = 999999)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions