summaryrefslogtreecommitdiff
path: root/numpy/linalg/linalg.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/linalg/linalg.py
parentd04bb02f393f0122e52b804bf548e0e18a0a2ecc (diff)
downloadnumpy-0283b6f480b7239dc1390dadf29fcb5e1f2516e3.tar.gz
Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str; .dtypechar -> .dtype.char
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r--numpy/linalg/linalg.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index e6a7bc3cb..88d76d24e 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -33,7 +33,7 @@ def _commonType(*arrays):
# force higher precision in lite version
precision = 1
for a in arrays:
- t = a.dtypechar
+ t = a.dtype.char
kind = max(kind, _array_kind[t])
precision = max(precision, _array_precision[t])
return _array_type[kind][precision]
@@ -55,7 +55,7 @@ _fastCT = fastCopyAndTranspose
def _fastCopyAndTranspose(type, *arrays):
cast_arrays = ()
for a in arrays:
- if a.dtypechar == type:
+ if a.dtype.char == type:
cast_arrays = cast_arrays + (_fastCT(a),)
else:
cast_arrays = cast_arrays + (_fastCT(a.astype(type)),)
@@ -209,16 +209,16 @@ def Heigenvalues(a, UPLO='L'):
def _convertarray(a):
if issubclass(a.dtype, complexfloating):
- if a.dtypechar == 'D':
+ if a.dtype.char == 'D':
a = _fastCT(a)
else:
a = _fastCT(a.astype('D'))
else:
- if a.dtypechar == 'd':
+ if a.dtype.char == 'd':
a = _fastCT(a)
else:
a = _fastCT(a.astype('d'))
- return a, a.dtypechar
+ return a, a.dtype.char
# Eigenvectors
@@ -370,7 +370,7 @@ def svd(a, full_matrices = 1):
def generalized_inverse(a, rcond = 1.e-10):
a = array(a, copy=0)
- if a.dtypechar in typecodes['Complex']:
+ if a.dtype.char in typecodes['Complex']:
a = conjugate(a)
u, s, vt = svd(a, 0)
m = u.shape[0]