numpy.ma.masked_all() function | Python Last Updated : 05 May, 2020 Comments Improve Suggest changes Like Article Like Report numpy.ma.masked_all() function return an empty masked array of the given shape and dtype, where all the data are masked. Syntax : numpy.ma.masked_all(shape, dtype) Parameter : shape : [tuple] Shape of the required MaskedArray. dtype : [dtype, optional] Data type of the output. Return : [MaskedArray] A masked array with all data masked. Code #1 : Python3 # Python program explaining # numpy.ma.masked_all() function # importing numpy as geek # and numpy.ma module as ma import numpy as geek import numpy.ma as ma gfg = ma.masked_all((4, 4)) print (gfg) Output : [[-- -- -- --] [-- -- -- --] [-- -- -- --] [-- -- -- --]] Code #2 : Python3 # Python program explaining # numpy.ma.masked_all() function # importing numpy as geek # and numpy.ma module as ma import numpy as geek import numpy.ma as ma gfg = ma.masked_all((3, 3), dtype = geek.int32) print (gfg) Output : [[-- -- --] [-- -- --] [-- -- --]] Comment More infoAdvertise with us Next Article numpy.ma.masked_all() function | Python S sanjoy_62 Follow Improve Article Tags : Machine Learning Python-numpy python Python Numpy-Masked Array Practice Tags : Machine Learningpython Similar Reads numpy.ma.masked_all_like() function | Python numpy.ma.masked_all_like() function return an empty masked array of the same shape and dtype as the array arr, where all the data are masked. Syntax : numpy.ma.masked_all_like(arr) Parameter : arr : [ndarray] An array describing the shape and dtype of the required MaskedArray. Return : [MaskedArray] 1 min read numpy.ma.clump_masked() function | Python numpy.ma.clump_masked() function returns a list of slices corresponding to the masked clumps of a 1-D array. Syntax : numpy.ma.clump_masked(arr) Parameters : arr : [ndarray] A one-dimensional masked array. Return : [list of slice] The list of slices, one for each continuous region of masked elements 1 min read numpy.ma.is_masked() function | Python numpy.ma.is_masked() function determine whether input has masked values & accepts any object as input, but always returns False unless the input is a MaskedArray containing masked values. Syntax : numpy.ma.is_masked(arr) Parameters : arr : [array_like] Array to check for masked values. Return : 1 min read numpy.ma.mask_cols() function | Python In thisnumpy.ma.mask_cols() function, mask columns of a 2D array that contain masked values. This function is a shortcut to mask_rowcols with axis equal to 1. Syntax : numpy.ma.mask_cols(arr, axis = None) Parameters : arr : [array_like, MaskedArray] The array to mask. axis : [int, optional] Axis alo 1 min read Numpy MaskedArray.all() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays. Masked arrays are arr 3 min read Like