summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/polyutils.py')
-rw-r--r--numpy/polynomial/polyutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/polyutils.py b/numpy/polynomial/polyutils.py
index 5b6663bfd..e2dba1a55 100644
--- a/numpy/polynomial/polyutils.py
+++ b/numpy/polynomial/polyutils.py
@@ -182,7 +182,7 @@ def as_series(alist, trim=True):
else:
try:
dtype = np.common_type(*arrays)
- except:
+ except Exception:
raise ValueError("Coefficient arrays have no common type")
ret = [np.array(a, copy=1, dtype=dtype) for a in arrays]
return ret
@@ -236,7 +236,7 @@ def trimcoef(c, tol=0):
raise ValueError("tol must be non-negative")
[c] = as_series([c])
- [ind] = np.where(np.abs(c) > tol)
+ [ind] = np.nonzero(np.abs(c) > tol)
if len(ind) == 0:
return c[:1]*0
else: