From 0283b6f480b7239dc1390dadf29fcb5e1f2516e3 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sun, 15 Jan 2006 03:10:36 +0000 Subject: Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str; .dtypechar -> .dtype.char --- numpy/core/defmatrix.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'numpy/core/defmatrix.py') diff --git a/numpy/core/defmatrix.py b/numpy/core/defmatrix.py index b0d45972e..1a9264380 100644 --- a/numpy/core/defmatrix.py +++ b/numpy/core/defmatrix.py @@ -58,17 +58,17 @@ class matrix(N.ndarray): dtype2 = data.dtype if (dtype is None): dtype = dtype2 - if (dtype2 is dtype) and (not copy): + if (dtype2 == dtype) and (not copy): return data return data.astype(dtype) if isinstance(data, N.ndarray): if dtype is None: - intype = data.dtypedescr + intype = data.dtype else: - intype = N.dtypedescr(dtype) + intype = N.dtype(dtype) new = data.view(matrix) - if intype != data.dtypedescr: + if intype != data.dtype: return new.astype(intype) if copy: return new.copy() else: return new @@ -94,7 +94,7 @@ class matrix(N.ndarray): if not (fortran or arr.flags.contiguous): arr = arr.copy() - ret = N.ndarray.__new__(subtype, shape, arr.dtypedescr, + ret = N.ndarray.__new__(subtype, shape, arr.dtype, buffer=arr, fortran=fortran) return ret @@ -199,7 +199,7 @@ class matrix(N.ndarray): return self.transpose() def getH(self): - if issubclass(self.dtype, N.complexfloating): + if issubclass(self.dtype.type, N.complexfloating): return self.transpose().conjugate() else: return self.transpose() -- cgit v1.2.1