I'm a new learner of Python. May I get some help on NumPy ? How does the Masking in index selection works?
My first masking is like
array[mask][:,0]
# array([1905., 1920., 1929., 1938., 1948., 1965., 2002., 2008., 2016.,2022.]
Which I understand how it works using index But my second
numpy.array[mask1][:,mask2]
# [[1905. 18.9]
# [1920. 20.6]
# [1929. 18.9]
# [1938. nan]
# [1948. 19.9]
# [1965. nan]
# [2002. nan]
# [2008. 19.5]
# [2016. 19.4]
# [2022. nan]]
# [[1905. 18.9]
# [1920. 20.6]
# [1929. 18.9]
# [1938. nan]
# [1948. 19.9]
# [1965. nan]
# [2002. nan]
# [2008. 19.5]
# [2016. 19.4]
# [2022. nan]]
I don't understand why it returns a (10,2) shape array
I hope I asking questions in the right way, sorry for any inconvenience.
mask.shape?