summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polynomial.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/polynomial.py')
-rw-r--r--numpy/polynomial/polynomial.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index 4e24e9c1f..8d7251b19 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -1366,7 +1366,7 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None):
rcond = len(x)*np.finfo(x.dtype).eps
# Determine the norms of the design matrix columns.
- if lhs.dtype.char in np.typecodes['Complex']:
+ if issubclass(lhs.dtype.type, np.complexfloating):
scl = np.sqrt((np.square(lhs.real) + np.square(lhs.imag)).sum(1))
else:
scl = np.sqrt(np.square(lhs).sum(1))