diff options
Diffstat (limited to 'numpy/oldnumeric/arrayfns.py')
-rw-r--r-- | numpy/oldnumeric/arrayfns.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/oldnumeric/arrayfns.py b/numpy/oldnumeric/arrayfns.py index 230b200a9..683ed309d 100644 --- a/numpy/oldnumeric/arrayfns.py +++ b/numpy/oldnumeric/arrayfns.py @@ -14,9 +14,9 @@ class error(Exception): def array_set(vals1, indices, vals2): indices = asarray(indices) if indices.ndim != 1: - raise ValueError, "index array must be 1-d" + raise ValueError("index array must be 1-d") if not isinstance(vals1, np.ndarray): - raise TypeError, "vals1 must be an ndarray" + raise TypeError("vals1 must be an ndarray") vals1 = asarray(vals1) vals2 = asarray(vals2) if vals1.ndim != vals2.ndim or vals1.ndim < 1: @@ -43,14 +43,14 @@ def interp(y, x, z, typ=None): def nz(x): x = asarray(x,dtype=np.ubyte) if x.ndim != 1: - raise TypeError, "intput must have 1 dimension." + raise TypeError("intput must have 1 dimension.") indxs = np.flatnonzero(x != 0) return indxs[-1].item()+1 def reverse(x, n): x = asarray(x,dtype='d') if x.ndim != 2: - raise ValueError, "input must be 2-d" + raise ValueError("input must be 2-d") y = np.empty_like(x) if n == 0: y[...] = x[::-1,:] @@ -71,7 +71,7 @@ def zmin_zmax(z, ireg): z = asarray(z, dtype=float) ireg = asarray(ireg, dtype=int) if z.shape != ireg.shape or z.ndim != 2: - raise ValueError, "z and ireg must be the same shape and 2-d" + raise ValueError("z and ireg must be the same shape and 2-d") ix, iy = np.nonzero(ireg) # Now, add more indices x1m = ix - 1 |