-
Notifications
You must be signed in to change notification settings - Fork 118
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
[FEATURE REQUEST] Implement numpy.ma #490
Comments
@water5 But can't you achieve the same thing via Boolean indexing? You just want to get rid of missing detector data, so that the missing data don't mess up any subsequent calculations, right?
I don't quite see, where the masked arrays would have an advantage (beyond convenience), when compared to Boolean indexing. In principle, I am not against the idea, but since this is a quite significant undertaking, I cannot assign high priority to it. Also, there are quite a few functions in
We never wanted to produce a one-to-one copy of |
a = np.arange(9).reshape((3, 3))
a
test_element = [1, 3, 6, 8]
test_element [1, 3, 6, 8] mask_ = np.isin(a, test_element)
mask_
a[mask_]
a[mask_] *= 10
a
But a = np.arange(5)
a
mask_ = [1, 3]
a[mask_]
I see #487, #488, is it that implement above operation after done? |
@water5
be unacceptably slow? |
https://numpy.org/doc/stable/reference/maskedarray.generic.html
numpy.ma
have some functions, can we implement several?numpy.ma.array
,numpy.ma.ones
,numpy.ma.empty
,numpy.ma.arange
,numpy.ma.masked_where
The text was updated successfully, but these errors were encountered: