Open In App

numpy.ma.masked_all_like() function | Python

Last Updated : 05 May, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
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] A masked array with all data masked.
Code #1 :
Output :
[[-- -- -- --]
 [-- -- -- --]
 [-- -- -- --]
 [-- -- -- --]]
  Code #2 :
Output :
[[-- -- --]
 [-- -- --]
 [-- -- --]
 [-- -- --]]

Next Article

Similar Reads