From 4072234146d63644ed0e658f685a5575ca051d9d Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Sat, 21 Jan 2006 19:18:18 +0000 Subject: Fix a few more improper uses of .dtype attribute. --- numpy/core/defchararray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/defchararray.py') 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_) -- cgit v1.2.1