numpy.ma.MaskedArray class is a subclass of ndarray for manipulating numeric arrays with missing data. With Numpy MaskedArray .__ sub__ we can subtract a specific value that is provided as a parameter in the MaskedArray .__ sub __ () method. The value will be subtracted from each item in the numpy array.
Syntax: numpy.MaskedArray .__ sub__
Return: Subtract others from self, and return a new masked array.
Example # 1:
In this example, we see that each element of the array is subtracted from the value specified as a parameter in the MaskedArray .__ sub __ () method. Remember one thing, this will not work for double type values.
[6 17 18 19 20] pre >
Example # 2:
[[16 17 18 19 20] [21 20 19 18 17]]
This book introduces machine learning methods in finance. It features a unified treatment of machine learn...
This book serves as a practical guide on how to utilize big data to store, process, and analyze structured data, focusing on three of the most popular Apache projects in the Hadoop ecosystem: Apache S...
During 2014, 2015, and 2016, surveys show that among all software developers, those with higher wages are the data engineers, the data scientists, and the data architects. This is because there is ...
Since you are interested in learning more about designing data visualizations (by virtue of the fact that you’re reading this book), then chances are good that you have been the reader of other peop...