diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-01-21 19:18:18 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-21 19:18:18 +0000 |
commit | 4072234146d63644ed0e658f685a5575ca051d9d (patch) | |
tree | 8c7c3c26f74a9b959cfcf46f92819092e896a791 /numpy | |
parent | 1b409ce9fe55ebf61eaa5d295753b0b8ad1efcf2 (diff) | |
download | numpy-4072234146d63644ed0e658f685a5575ca051d9d.tar.gz |
Fix a few more improper uses of .dtype attribute.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/defchararray.py | 4 | ||||
-rw-r--r-- | numpy/linalg/linalg.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 933b4d5ce..6f28b3d77 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -93,7 +93,7 @@ class chararray(ndarray): def __mul__(self, other): b = broadcast(self, other) arr = b.iters[1].base - if not issubclass(arr.dtype, integer): + if not issubclass(arr.dtype.type, integer): raise ValueError, "Can only multiply by integers" outitem = b.iters[0].base.itemsize * arr.max() result = chararray(b.shape, outitem, self.dtype is unicode_) @@ -105,7 +105,7 @@ class chararray(ndarray): def __rmul__(self, other): b = broadcast(self, other) arr = b.iters[1].base - if not issubclass(arr.dtype, integer): + if not issubclass(arr.dtype.type, integer): raise ValueError, "Can only multiply by integers" outitem = b.iters[0].base.itemsize * arr.max() result = chararray(b.shape, outitem, self.dtype is unicode_) diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 88d76d24e..abb65be18 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -208,7 +208,7 @@ def Heigenvalues(a, UPLO='L'): return w def _convertarray(a): - if issubclass(a.dtype, complexfloating): + if issubclass(a.dtype.type, complexfloating): if a.dtype.char == 'D': a = _fastCT(a) else: |