summaryrefslogtreecommitdiff
path: root/numpy/core/defmatrix.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-15 03:10:36 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-15 03:10:36 +0000
commit0283b6f480b7239dc1390dadf29fcb5e1f2516e3 (patch)
tree6d75e6fb25fb7ff9e5668df1dfad9c7edba7a00e /numpy/core/defmatrix.py
parentd04bb02f393f0122e52b804bf548e0e18a0a2ecc (diff)
downloadnumpy-0283b6f480b7239dc1390dadf29fcb5e1f2516e3.tar.gz
Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str; .dtypechar -> .dtype.char
Diffstat (limited to 'numpy/core/defmatrix.py')
-rw-r--r--numpy/core/defmatrix.py12
1 files changed, 6 insertions, 6 deletions
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()