summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2011-04-05 17:10:31 -0600
committerCharles Harris <charlesr.harris@gmail.com>2011-04-05 17:38:00 -0600
commitfd2630366581049af6c9acc4b41315363b47b55a (patch)
tree8e17cdee3bfb7c9f1c30d793d1ce0267f1016e22 /numpy/oldnumeric
parentb2793ea74ea05bc64288287dd2efbe0dcae99534 (diff)
downloadnumpy-fd2630366581049af6c9acc4b41315363b47b55a.tar.gz
STY: Fix up some remaining old-style exceptions.
I think that is the end of it.
Diffstat (limited to 'numpy/oldnumeric')
-rw-r--r--numpy/oldnumeric/ma.py4
-rw-r--r--numpy/oldnumeric/precision.py3
-rw-r--r--numpy/oldnumeric/random_array.py8
3 files changed, 8 insertions, 7 deletions
diff --git a/numpy/oldnumeric/ma.py b/numpy/oldnumeric/ma.py
index e383560b2..732e8447a 100644
--- a/numpy/oldnumeric/ma.py
+++ b/numpy/oldnumeric/ma.py
@@ -614,10 +614,10 @@ class MaskedArray (object):
"numeric because data\n is masked in one or "\
"more locations.");
return self._data
- #raise MAError, \
+ #raise MAError(
# """Cannot automatically convert masked array to numeric because data
# is masked in one or more locations.
- # """
+ # """)
else:
func, args, i = context
fills = ufunc_fills.get(func)
diff --git a/numpy/oldnumeric/precision.py b/numpy/oldnumeric/precision.py
index c095ceb19..c773e9478 100644
--- a/numpy/oldnumeric/precision.py
+++ b/numpy/oldnumeric/precision.py
@@ -33,7 +33,8 @@ def _lookup(table, key, required_bits):
for bits, typecode in lst:
if bits >= required_bits:
return typecode
- raise PrecisionError, key+" of "+str(required_bits)+" bits not available on this system"
+ raise PrecisionError(key + " of " + str(required_bits) +
+ " bits not available on this system")
Character = 'c'
diff --git a/numpy/oldnumeric/random_array.py b/numpy/oldnumeric/random_array.py
index ffae79616..777e2a645 100644
--- a/numpy/oldnumeric/random_array.py
+++ b/numpy/oldnumeric/random_array.py
@@ -19,10 +19,10 @@ def seed(x=0, y=0):
mt.seed((x,y))
def get_seed():
- raise NotImplementedError, \
- "If you want to save the state of the random number generator.\n"\
- "Then you should use obj = numpy.random.get_state() followed by.\n"\
- "numpy.random.set_state(obj)."
+ raise NotImplementedError(
+ "If you want to save the state of the random number generator.\n"
+ "Then you should use obj = numpy.random.get_state() followed by.\n"
+ "numpy.random.set_state(obj).")
def random(shape=[]):
"random(n) or random([n, m, ...]) returns array of random numbers"