Last active
July 21, 2019 05:02
-
-
Save estysdesu/ac1705dda92b29a8fea33db1729fb36d to your computer and use it in GitHub Desktop.
[Python: Numpy mask arrays] #numpy #maskarray #python #ma #np
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
x1 = np.ma.array([0, 1, 2, 3, 4]) | |
x1.mask # --> [False] | |
x2 = np.ma.array([0, 1, 2, 3, 4], mask=[False]) # triggers mask expansion | |
x2.mask # --> [False, False, False, False, False] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment