summaryrefslogtreecommitdiff
path: root/numpy/core/defmatrix.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/defmatrix.py')
-rw-r--r--numpy/core/defmatrix.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py
index 1c500e886..d1636e8b5 100644
--- a/numpy/core/defmatrix.py
+++ b/numpy/core/defmatrix.py
@@ -302,6 +302,10 @@ class matrix(N.ndarray):
def __pow__(self, other):
return matrix_power(self, other)
+ def __ipow__(self, other):
+ self[:] = self ** other
+ return self
+
def __rpow__(self, other):
return NotImplemented