Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eric-wieser opened this issue Jan 20, 2017 · 0 comments
Closed

Comments

@eric-wieser
Copy link
Member

eric-wieser commented Jan 20, 2017

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)
@eric-wieser eric-wieser changed the title MaskedArray inappropriate "setting an array element with a sequence" BUG: MaskedArray inappropriate "setting an array element with a sequence" Jan 20, 2017
@eric-wieser eric-wieser added the component: numpy.ma masked arrays label Feb 19, 2017
eric-wieser added a commit to eric-wieser/numpy that referenced this issue Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant