From 3655b732bd08022dab8498b44191d6c4049bc7a8 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 28 Feb 2013 17:23:13 -0700 Subject: 2to3: Apply `raise` fixes. Closes #3077. Replaces the raise Exception, msg: form with raise Exception(msg): --- numpy/lib/polynomial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib') diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index fad06f4df..421efb675 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -564,9 +564,9 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False): if w is not None: w = NX.asarray(w) + 0.0 if w.ndim != 1: - raise TypeError, "expected a 1-d array for weights" + raise TypeError("expected a 1-d array for weights") if w.shape[0] != y.shape[0] : - raise TypeError, "expected w and y to have the same length" + raise TypeError("expected w and y to have the same length") lhs *= w[:, NX.newaxis] if rhs.ndim == 2: rhs *= w[:, NX.newaxis] -- cgit v1.2.1