Python | Numpy np.mask_or() method Last Updated : 30 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of np.mask_or() method, we can combine the two masks with logical OR operator by using np.mask_or() method. Syntax : np.mask_or(m1, m2) Return : Return the masks with logical OR operator. Example #1 : In this example we can see that by using np.mask_or() method, we are able to get the two masks with logical OR operator by using this method. Python3 1=1 # import numpy and mask_or import numpy as np m1 = np.array([1, 1, 0, 1]) m2 = np.array([0, 0, 1, 1]) # using np.mask_or() method gfg = np.ma.mask_or(m1, m2) print(gfg) Output : [True True True True] Example #2 : Python3 1=1 # import numpy and mask_or import numpy as np m1 = np.array([1, 0, 0, 1, 0]) m2 = np.array([0, 0, 1, 1, 0]) # using np.mask_or() method gfg = np.ma.mask_or(m1, m2) print(gfg) Output : [True False True True False] Comment More infoAdvertise with us Next Article Python | numpy.ma.ids() method J jitender_1998 Follow Improve Article Tags : Python SymPy Practice Tags : python Similar Reads Python | Numpy getmask() method With the help of numpy.getmask() method, we can get the masked matrix of numpy array which shows masked values by using numpy.getmask() method. Syntax : numpy.getmask(array) Return : Return masked values of a matrix. Example #1 : In this example we can see that by using numpy.getmask() method, we ar 1 min read Python | numpy.ma.ids() method With the help of numpy.ma.ids() method, we can get the address of masked array having data by using numpy.ma.ids() method. Syntax : numpy.ma.ids(array, mask) Return : Return the address of masked array. Example #1 : In this example we can see that by using numpy.ma.ids() method, we are able to get t 1 min read Python | Numpy MaskedArray.__or__ numpy.ma.MaskedArray class is a subclass of ndarray designed to manipulate numerical arrays with missing data. With the help of Numpy MaskedArray.__or__ method we can get the elements that is OR by the value that is provided as a parameter. Syntax: numpy.MaskedArray.__or__ Return: Return self|value. 1 min read python | Numpy masked_equal() method With the help of numpy.ma.masked_equal() method, we can get the mask a value that in an array by using numpy.ma.masked_equal() method. Syntax : numpy.ma.masked_equal(array, value) Return : Return the array after removing mask value. Example #1 : In this example we can see that by using numpy.ma.mask 1 min read Python | Numpy getmaskarray() method With the help of numpy.getmaskarray() method, we can get the masked matrix in the form numpy array which shows masked values by using numpy.getmaskarray() method. Syntax : numpy.getmaskarray(array) Return : Return masked values in the form of numpy array. Example #1 : In this example we can see that 1 min read Numpy np.ma.concatenate() method-Python np.ma.concatenate() method joins two or more masked arrays along an existing axis. It works similarly to np.concatenate() but it is specifically designed for masked arrays which may contain missing or invalid data that is "masked" i.e marked to be ignored in computations. Example:Pythonimport numpy 2 min read Like