diff options
Diffstat (limited to 'numpy/matrixlib')
-rw-r--r-- | numpy/matrixlib/defmatrix.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/numpy/matrixlib/defmatrix.py b/numpy/matrixlib/defmatrix.py index e016b5f4c..1f5c94921 100644 --- a/numpy/matrixlib/defmatrix.py +++ b/numpy/matrixlib/defmatrix.py @@ -328,19 +328,6 @@ class matrix(N.ndarray): def __rpow__(self, other): return NotImplemented - def __repr__(self): - s = repr(self.__array__()).replace('array', 'matrix') - # now, 'matrix' has 6 letters, and 'array' 5, so the columns don't - # line up anymore. We need to add a space. - l = s.splitlines() - for i in range(1, len(l)): - if l[i]: - l[i] = ' ' + l[i] - return '\n'.join(l) - - def __str__(self): - return str(self.__array__()) - def _align(self, axis): """A convenience function for operations that need to preserve axis orientation. @@ -699,15 +686,15 @@ class matrix(N.ndarray): >>> (x == y) matrix([[ True, True, True, True], [False, False, False, False], - [False, False, False, False]], dtype=bool) + [False, False, False, False]]) >>> (x == y).all() False >>> (x == y).all(0) - matrix([[False, False, False, False]], dtype=bool) + matrix([[False, False, False, False]]) >>> (x == y).all(1) matrix([[ True], [False], - [False]], dtype=bool) + [False]]) """ return N.ndarray.all(self, axis, out, keepdims=True)._collapse(axis) |