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.
p > Output: p >
# import important module into python
numpy as np
# make an array with NumPy
# applying the MaskedArray method .____ ()
(np.ma. MaskedArray .__ abs __ (gfg))
[1 2 3 4 5 6]
Example # 2:
[[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 ...
A Problem-Solver’s Guide to Building Real-World 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...
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...
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...