diff options
author | Robert Kern <robert.kern@gmail.com> | 2005-11-13 08:35:47 +0000 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2005-11-13 08:35:47 +0000 |
commit | 2cc83c5183e257bcc6f218d998bd7d315885862e (patch) | |
tree | e1b7d32ea5431a8eb395907cf2bbc426538011f9 /scipy/base/polynomial.py | |
parent | 35c019e267d08bee6c17308b29c5bc6c4928dec6 (diff) | |
download | numpy-2cc83c5183e257bcc6f218d998bd7d315885862e.tar.gz |
r823@Blasphemy: kern | 2005-11-13 00:35:39 -0800
Fixed isinstance() uses
Diffstat (limited to 'scipy/base/polynomial.py')
-rw-r--r-- | scipy/base/polynomial.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scipy/base/polynomial.py b/scipy/base/polynomial.py index 46522c8c5..845aa94f0 100644 --- a/scipy/base/polynomial.py +++ b/scipy/base/polynomial.py @@ -67,7 +67,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 isinstance(a.dtype, NX.complexfloating): + if issubclass(a.dtype, 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)) @@ -101,7 +101,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 isinstance(p.dtype, (NX.floating, NX.complexfloating)): + if not issubclass(p.dtype, (NX.floating, NX.complexfloating)): p = p.astype(float) N = len(p) |