Assume
a = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
]
mask = [1, 0, 1]
I want
a[mask] == [
[1, 2, 3],
[False, False, False],
[7, 8, 9],
]
or equivalent.
Meaning, I want to access a
with mask
, where mask
is of lower dimension, and have auto broadcasting.
I want to use that in the constructor of np.ma.array
in the mask=
argument.