summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-21 19:18:18 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-21 19:18:18 +0000
commit4072234146d63644ed0e658f685a5575ca051d9d (patch)
tree8c7c3c26f74a9b959cfcf46f92819092e896a791 /numpy/core/defchararray.py
parent1b409ce9fe55ebf61eaa5d295753b0b8ad1efcf2 (diff)
downloadnumpy-4072234146d63644ed0e658f685a5575ca051d9d.tar.gz
Fix a few more improper uses of .dtype attribute.
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r--numpy/core/defchararray.py4
1 files changed, 2 insertions, 2 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_)