summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-15 03:28:40 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-15 03:28:40 +0000
commitee91d88c01947723ae6ee7f0255f8357f7d8845c (patch)
treef834f8c7a0b308680a048673c568bae3eb0dc940 /numpy/lib/polynomial.py
parent0283b6f480b7239dc1390dadf29fcb5e1f2516e3 (diff)
downloadnumpy-ee91d88c01947723ae6ee7f0255f8357f7d8845c.tar.gz
Fix bad use of .dtype
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index f875e52f0..0978c6274 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -65,7 +65,7 @@ def poly(seq_of_zeros):
for k in range(len(seq_of_zeros)):
a = NX.convolve(a, [1, -seq_of_zeros[k]], mode='full')
- if issubclass(a.dtype, NX.complexfloating):
+ if issubclass(a.dtype.type, NX.complexfloating):
# if complex roots are all complex conjugates, the roots are real.
roots = NX.asarray(seq_of_zeros, complex)
pos_roots = sort_complex(NX.compress(roots.imag > 0, roots))
@@ -99,7 +99,7 @@ def roots(p):
p = p[int(non_zero[0]):int(non_zero[-1])+1]
# casting: if incoming array isn't floating point, make it floating point.
- if not issubclass(p.dtype, (NX.floating, NX.complexfloating)):
+ if not issubclass(p.dtype.type, (NX.floating, NX.complexfloating)):
p = p.astype(float)
N = len(p)