You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MaskArray.take does not work with scalar indices #7585
Activity
[-]MaskArray.take does not work[/-][+]MaskArray.take does not work on scalars[/+][-]MaskArray.take does not work on scalars[/-][+]MaskArray.take does not work with scalar indices[/+]charris commentedon Apr 28, 2016
Interesting. @ahaldane Thoughts?
eric-wieser commentedon Apr 28, 2016
Fixed by adding a
np.asarrayand a[...], I thinkeric-wieser commentedon Apr 28, 2016
The underlying issue is that
np.int32(1).view(MaskedArray)does not return aMaskedArray!eric-wieser commentedon Apr 28, 2016
Workaround:
m.take(keys[np.newaxis])[0]in place ofm.take(keys)TST: Verify np.ma.take works on scalars
BUG: Ensure mask is preserved on scalars
charris commentedon May 2, 2016
Closed by #7586.
TST: Verify np.ma.take works on scalars
BUG: Ensure mask is preserved on scalars