diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 17:10:31 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-04-05 17:38:00 -0600 |
commit | fd2630366581049af6c9acc4b41315363b47b55a (patch) | |
tree | 8e17cdee3bfb7c9f1c30d793d1ce0267f1016e22 /numpy/core/machar.py | |
parent | b2793ea74ea05bc64288287dd2efbe0dcae99534 (diff) | |
download | numpy-fd2630366581049af6c9acc4b41315363b47b55a.tar.gz |
STY: Fix up some remaining old-style exceptions.
I think that is the end of it.
Diffstat (limited to 'numpy/core/machar.py')
-rw-r--r-- | numpy/core/machar.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/numpy/core/machar.py b/numpy/core/machar.py index 08ea2ae61..ea9174017 100644 --- a/numpy/core/machar.py +++ b/numpy/core/machar.py @@ -128,7 +128,7 @@ class MachAr(object): if any(temp1 - one != zero): break else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) b = one for _ in xrange(max_iterN): b = b + b @@ -137,7 +137,7 @@ class MachAr(object): if any(itemp != 0): break else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) ibeta = itemp beta = float_conv(ibeta) @@ -152,7 +152,7 @@ class MachAr(object): if any(temp1 - one != zero): break else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) betah = beta / two a = one @@ -163,7 +163,7 @@ class MachAr(object): if any(temp1 - one != zero): break else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) temp = a + betah irnd = 0 if any(temp-a != zero): @@ -191,7 +191,7 @@ class MachAr(object): raise RuntimeError("could not determine machine tolerance " "for 'negep', locals() -> %s" % (locals())) else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) negep = -negep epsneg = a @@ -206,7 +206,7 @@ class MachAr(object): a = a * beta machep = machep + 1 else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) eps = a # Determine ngrd @@ -234,7 +234,7 @@ class MachAr(object): i = i + 1 k = k + k else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) if ibeta != 10: iexp = i + 1 mx = k + k @@ -262,7 +262,7 @@ class MachAr(object): else: break else: - raise RuntimeError, msg % (_, one.dtype) + raise RuntimeError(msg % (_, one.dtype)) minexp = -k # Determine maxexp, xmax |