[Scipy-svn] r6925 - trunk/scipy/odr
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Nov 20 03:12:18 EST 2010
Author: warren.weckesser
Date: 2010-11-20 02:12:18 -0600 (Sat, 20 Nov 2010)
New Revision: 6925
Modified:
trunk/scipy/odr/odrpack.py
Log:
ENH: odr: update 'raise' statements
Modified: trunk/scipy/odr/odrpack.py
===================================================================
--- trunk/scipy/odr/odrpack.py 2010-11-20 08:03:52 UTC (rev 6924)
+++ trunk/scipy/odr/odrpack.py 2010-11-20 08:12:18 UTC (rev 6925)
@@ -316,7 +316,7 @@
if attr in self.meta.keys():
return self.meta[attr]
else:
- raise AttributeError, "'%s' not in metadata" % attr
+ raise AttributeError("'%s' not in metadata" % attr)
class RealData(Data):
@@ -355,9 +355,9 @@
def __init__(self, x, y=None, sx=None, sy=None, covx=None, covy=None,
fix=None, meta={}):
if (sx is not None) and (covx is not None):
- raise ValueError, "cannot set both sx and covx"
+ raise ValueError("cannot set both sx and covx")
if (sy is not None) and (covy is not None):
- raise ValueError, "cannot set both sy and covy"
+ raise ValueError("cannot set both sy and covy")
# Set flags for __getattr__
self._ga_flags = {}
@@ -414,7 +414,7 @@
if attr in self.meta.keys():
return self.meta[attr]
else:
- raise AttributeError, "'%s' not in metadata" % attr
+ raise AttributeError("'%s' not in metadata" % attr)
else:
func, arg = lookup_tbl[(attr, self._ga_flags[attr])]
@@ -528,7 +528,7 @@
if attr in self.meta.keys():
return self.meta[attr]
else:
- raise AttributeError, "'%s' not in metadata" % attr
+ raise AttributeError("'%s' not in metadata" % attr)
class Output(object):
@@ -1101,7 +1101,7 @@
"""
if self.output is None:
- raise odr_error, "cannot restart: run() has not been called before"
+ raise odr_error("cannot restart: run() has not been called before")
self.set_job(restart=1)
self.work = self.output.work
More information about the Scipy-svn
mailing list