numpy.ma.MaskedArray class is a subclass of ndarray for manipulating numeric arrays with missing data. With Numpy MaskedArray .__ rdivmod__ we will get two arrays, one of which has elements that are divisible by the values provided in the numpy.ma .__ rdivmod __ () method, and the second — elements that perform a mod operation with the same value as in numpy. .ma .__ rdivmod __ () method.
Syntax: numpy.MaskedArray .__ rdivmod__
Return: Return divmod (value, self).
Example # 1:
In this example, we can see that using the MaskedArray method .__ rdivmod __ ( ) we get two arrays. One with a division with the value that is passed as a parameter, and the other with the values of the mod.
(masked_array (data = [3 1 1 0 0], mask = [False False False False False], fill_value = 999999), masked_array (data = [0 1 0 3 3], mask = [False False False False False], fill_value = 999999))
Example # 2:
Output: b >
(masked_array (data = [[3 1 1 0 0] [0 0 0 1 1]], mask = [[False False False False False] [False False Fa lse False False]], fill_value = 999999), masked_array (data = [[0 1 0 3 3] [3 3 3 0 1]], mask = [[False False False False False] [False False False False False]] , fill_value = 999999))
ig Data applications are growing very rapidly around the globe. This new approach to decision making takes into account data gathered from multiple sources. Here my goal is to show how these diverse s...
R for Everyone: Advanced Analytics and Graphics. ...
Professional-quality code does more than just run without bugs. It’s clean, readable, and easy to maintain. To step up from a capable Python coder to a professional developer, you need to learn indu...
Black Hat Python, 2nd Edition: Python Programming for Hackers and Pentesters PDF, 2nd Edition. Fully updated for Python 3, the second edition of this worldwide bestseller (over 100,000 copies sold)...