numpy.ma.MaskedArray class
is a subclass of ndarray for manipulating numeric arrays with missing data. With the Numpy operator MaskedArray .__ abs__ we can find the absolute value of each element in the array. Suppose we have values 31,74, using MaskedArray .__ abs __ () it will be converted to 31.
Syntax: numpy.MaskedArray .__ abs__
Return: floor (self)
Example # 1:
In this example, we we see that after applying MaskedArray .__ abs __ () we get a simple array that can contain the absolute values of all elements of the array.

Output:
[1 2 3 4 5 6]
Example # 2:
# import important module in python
import
numpy as np
# make an array with NumPy
gfg =
np.array ([[
1.22
,
2.25
,

3.21
,
4.45
,
5.56
,
6
],
[

6.65
,
5.55
,
4.32
,
3.33
,
2.12
,

1.05
]])
# applying MaskedArray .__ abs __ () method
print
(np.ma.MaskedArray .__ abs __ (gfg))
Exit:
[[1 2 3 4 5 6] [6 5 4 3 2 1]]
Grokking Deep Learning teaches you to build deep learning neural networks from scratch! In his immersive style, deep learning expert Andrew Trask shows you the hidden science so you can uncover every ...
05/09/2021
A ProblemSolver’s Guide to Building RealWorld Intelligent Systems. Data is the new oil and Machine Learning is a powerful concept and framework for making the best out of it. In this age of aut...
23/09/2020
Big data is, admittedly, an overhyped buzzword used by software and hardware companies to boost their sales. Behind the hype, however, there is a real and extremely important technology trend with imp...
10/07/2020
We are witnessing a movement that will completely transform any part of business and society. The word we have given to this move ment is Big Data and it will change everything, from the way banks an...
10/07/2020