From cfd766456368777bcb0d5edabd360b3aeb02d3f8 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Tue, 5 Apr 2011 15:01:52 -0600 Subject: STY: Update exception style, easy ones. --- numpy/core/numeric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 2dace5de1..6891ea768 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -977,7 +977,7 @@ def tensordot(a, b, axes=2): if axes_b[k] < 0: axes_b[k] += ndb if not equal: - raise ValueError, "shape-mismatch for sum" + raise ValueError("shape-mismatch for sum") # Move the axes to sum over to the end of "a" # and to the front of "b" @@ -2279,7 +2279,7 @@ def seterrcall(func): """ if func is not None and not callable(func): if not hasattr(func, 'write') or not callable(func.write): - raise ValueError, "Only callable can be used as callback" + raise ValueError("Only callable can be used as callback") pyvals = umath.geterrobj() old = geterrcall() pyvals[2] = func -- cgit v1.2.1