summaryrefslogtreecommitdiff
path: root/numpy/polynomial
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial')
-rw-r--r--numpy/polynomial/_polybase.py16
-rw-r--r--numpy/polynomial/chebyshev.py4
-rw-r--r--numpy/polynomial/hermite.py4
-rw-r--r--numpy/polynomial/hermite_e.py4
-rw-r--r--numpy/polynomial/laguerre.py4
-rw-r--r--numpy/polynomial/legendre.py4
-rw-r--r--numpy/polynomial/polynomial.py4
-rw-r--r--numpy/polynomial/polyutils.py2
8 files changed, 21 insertions, 21 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py
index 39f5fac31..7fde63206 100644
--- a/numpy/polynomial/_polybase.py
+++ b/numpy/polynomial/_polybase.py
@@ -312,7 +312,7 @@ class ABCPolyBase(object):
coef = self._add(self.coef, othercoef)
except TypeError as e:
raise e
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
@@ -322,7 +322,7 @@ class ABCPolyBase(object):
coef = self._sub(self.coef, othercoef)
except TypeError as e:
raise e
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
@@ -332,7 +332,7 @@ class ABCPolyBase(object):
coef = self._mul(self.coef, othercoef)
except TypeError as e:
raise e
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
@@ -367,7 +367,7 @@ class ABCPolyBase(object):
quo, rem = self._div(self.coef, othercoef)
except (TypeError, ZeroDivisionError) as e:
raise e
- except:
+ except Exception:
return NotImplemented
quo = self.__class__(quo, self.domain, self.window)
rem = self.__class__(rem, self.domain, self.window)
@@ -381,21 +381,21 @@ class ABCPolyBase(object):
def __radd__(self, other):
try:
coef = self._add(other, self.coef)
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
def __rsub__(self, other):
try:
coef = self._sub(other, self.coef)
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
def __rmul__(self, other):
try:
coef = self._mul(other, self.coef)
- except:
+ except Exception:
return NotImplemented
return self.__class__(coef, self.domain, self.window)
@@ -425,7 +425,7 @@ class ABCPolyBase(object):
quo, rem = self._div(other, self.coef)
except ZeroDivisionError as e:
raise e
- except:
+ except Exception:
return NotImplemented
quo = self.__class__(quo, self.domain, self.window)
rem = self.__class__(rem, self.domain, self.window)
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py
index 49d0302e0..b983b2fec 100644
--- a/numpy/polynomial/chebyshev.py
+++ b/numpy/polynomial/chebyshev.py
@@ -1225,7 +1225,7 @@ def chebval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = chebval(x, c)
@@ -1338,7 +1338,7 @@ def chebval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = chebval(x, c)
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py
index a03fe722c..ccf0fc146 100644
--- a/numpy/polynomial/hermite.py
+++ b/numpy/polynomial/hermite.py
@@ -988,7 +988,7 @@ def hermval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = hermval(x, c)
@@ -1101,7 +1101,7 @@ def hermval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = hermval(x, c)
diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py
index 2a29d61cf..2fafea4af 100644
--- a/numpy/polynomial/hermite_e.py
+++ b/numpy/polynomial/hermite_e.py
@@ -986,7 +986,7 @@ def hermeval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = hermeval(x, c)
@@ -1099,7 +1099,7 @@ def hermeval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = hermeval(x, c)
diff --git a/numpy/polynomial/laguerre.py b/numpy/polynomial/laguerre.py
index c9e1302e1..387d986fa 100644
--- a/numpy/polynomial/laguerre.py
+++ b/numpy/polynomial/laguerre.py
@@ -988,7 +988,7 @@ def lagval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = lagval(x, c)
@@ -1101,7 +1101,7 @@ def lagval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = lagval(x, c)
diff --git a/numpy/polynomial/legendre.py b/numpy/polynomial/legendre.py
index be8410b82..5a263ef89 100644
--- a/numpy/polynomial/legendre.py
+++ b/numpy/polynomial/legendre.py
@@ -1026,7 +1026,7 @@ def legval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = legval(x, c)
@@ -1139,7 +1139,7 @@ def legval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = legval(x, c)
diff --git a/numpy/polynomial/polynomial.py b/numpy/polynomial/polynomial.py
index c357b48c9..4b343bf7d 100644
--- a/numpy/polynomial/polynomial.py
+++ b/numpy/polynomial/polynomial.py
@@ -913,7 +913,7 @@ def polyval2d(x, y, c):
"""
try:
x, y = np.array((x, y), copy=0)
- except:
+ except Exception:
raise ValueError('x, y are incompatible')
c = polyval(x, c)
@@ -1026,7 +1026,7 @@ def polyval3d(x, y, z, c):
"""
try:
x, y, z = np.array((x, y, z), copy=0)
- except:
+ except Exception:
raise ValueError('x, y, z are incompatible')
c = polyval(x, c)
diff --git a/numpy/polynomial/polyutils.py b/numpy/polynomial/polyutils.py
index 22d649b0a..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