numpy.ma.MaskedArray class is a subclass of ndarray designed to manipulate numerical arrays with missing data. With the help of Numpy MaskedArray.__pow__ method we can get the elements powered with the value that is provided as a parameter.
Return: Raise other to the power self, masking the potential NaNs.
Example #1 :
In this example we can see that after applying MaskedArray.__rpow__(), we can see that every element get powered with the value that is provided as a parameter.
[ 3 9 27 81 243]
[[ 1 4 9 16 25] [36 25 16 9 4]]
- Python | Numpy numpy.ndarray.__imul__()
- Python | Numpy numpy.ndarray.__or__()
- Python | Numpy numpy.ndarray.__gt__()
- Python | Numpy numpy.ndarray.__pow__()
- Python | Numpy numpy.ndarray.__le__()
- Python | Numpy numpy.ndarray.__ge__()
- Python | Numpy numpy.ndarray.__eq__()
- Python | Numpy numpy.ndarray.__and__()
- Python | Numpy numpy.ndarray.__divmod__()
- Python | Numpy numpy.ndarray.__isub__()
- Python | Numpy numpy.ndarray.__xor__()
- Python | Numpy numpy.ndarray.__floordiv__()
- Python | Numpy numpy.ndarray.__lt__()
- Python | Numpy numpy.ndarray.__iadd__()
- Python | Numpy numpy.ndarray.__ne__()
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.