summaryrefslogtreecommitdiff
path: root/numpy/polynomial/_polybase.py
diff options
context:
space:
mode:
authorSahil Siddiq <39989901+valdaarhun@users.noreply.github.com>2020-10-07 10:38:29 +0530
committerGitHub <noreply@github.com>2020-10-07 08:08:29 +0300
commit590201aa6ef313f9d34fa4136d6f0b3b3c36e951 (patch)
tree9eb347fe3bb37d8e8655f0d04c152690fb2d3915 /numpy/polynomial/_polybase.py
parent2eed8784d5946e420500bf87f9af305d87aaa055 (diff)
downloadnumpy-590201aa6ef313f9d34fa4136d6f0b3b3c36e951.tar.gz
MAINT: Chain exceptions in "_polybase.py" (#17453)
* Removed "from" keyword and changed "raise e" to "raise"
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r--numpy/polynomial/_polybase.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py
index f4a67a222..59c380f10 100644
--- a/numpy/polynomial/_polybase.py
+++ b/numpy/polynomial/_polybase.py
@@ -547,8 +547,8 @@ class ABCPolyBase(abc.ABC):
othercoef = self._get_coefficients(other)
try:
quo, rem = self._div(self.coef, othercoef)
- except ZeroDivisionError as e:
- raise e
+ except ZeroDivisionError:
+ raise
except Exception:
return NotImplemented
quo = self.__class__(quo, self.domain, self.window)
@@ -605,8 +605,8 @@ class ABCPolyBase(abc.ABC):
def __rdivmod__(self, other):
try:
quo, rem = self._div(other, self.coef)
- except ZeroDivisionError as e:
- raise e
+ except ZeroDivisionError:
+ raise
except Exception:
return NotImplemented
quo = self.__class__(quo, self.domain, self.window)