Skip to content

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

Closed

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)

Activity

  1. changed the title [-]MaskedArray inappropriate "setting an array element with a sequence"[/-] [+]BUG: MaskedArray inappropriate "setting an array element with a sequence"[/+] on Jan 20, 2017
  2. added a commit that references this issue on Feb 20, 2017
    10bf55e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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