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/oldnumeric/arrayfns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/oldnumeric/arrayfns.py') diff --git a/numpy/oldnumeric/arrayfns.py b/numpy/oldnumeric/arrayfns.py index 683ed309d..54992de57 100644 --- a/numpy/oldnumeric/arrayfns.py +++ b/numpy/oldnumeric/arrayfns.py @@ -20,7 +20,7 @@ def array_set(vals1, indices, vals2): vals1 = asarray(vals1) vals2 = asarray(vals2) if vals1.ndim != vals2.ndim or vals1.ndim < 1: - raise error, "vals1 and vals2 must have same number of dimensions (>=1)" + raise error("vals1 and vals2 must have same number of dimensions (>=1)") vals1[indices] = vals2 from numpy import digitize @@ -38,7 +38,7 @@ def interp(y, x, z, typ=None): if typ == 'f': return res.astype('f') - raise error, "incompatible typecode" + raise error("incompatible typecode") def nz(x): x = asarray(x,dtype=np.ubyte) -- cgit v1.2.1