From ba41f2f5d864551b4462a9f53e8f23f626b11105 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Tue, 18 Jul 2006 19:19:28 +0000 Subject: Fix sub-classing of matrices.. --- numpy/core/defmatrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/defmatrix.py') diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index 66057be17..bfcb68364 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -68,7 +68,7 @@ class matrix(N.ndarray): intype = data.dtype else: intype = N.dtype(dtype) - new = data.view(matrix) + new = data.view(subtype) if intype != data.dtype: return new.astype(intype) if copy: return new.copy() -- cgit v1.2.1