summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-08-23 19:12:18 -0600
committerGitHub <noreply@github.com>2020-08-23 19:12:18 -0600
commitb4d2295bb5ba3c866553c1d7c10938f7f00c3286 (patch)
tree328e1f7f55b12d0431cd5035611d88a98ffa466d
parent1af65ee2225a011b39a9cceac306328be3737aa2 (diff)
parent0b2f5ed3fdf04874e23b19d03fa2938af146c203 (diff)
downloadnumpy-b4d2295bb5ba3c866553c1d7c10938f7f00c3286.tar.gz
Merge pull request #17133 from karan-dhir/chainexceptions-timer_comparison
MAINT: Chain ValueError in ma.timer_comparison
-rw-r--r--numpy/ma/timer_comparison.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/ma/timer_comparison.py b/numpy/ma/timer_comparison.py
index 83bd7852e..f5855efcf 100644
--- a/numpy/ma/timer_comparison.py
+++ b/numpy/ma/timer_comparison.py
@@ -100,9 +100,9 @@ class ModuleTester:
header=header,
names=('x', 'y'))
assert cond, msg
- except ValueError:
+ except ValueError as e:
msg = build_err_msg([x, y], err_msg, header=header, names=('x', 'y'))
- raise ValueError(msg)
+ raise ValueError(msg) from e
def assert_array_equal(self, x, y, err_msg=''):
"""