[Numpy-svn] r3514 - trunk/numpy/core
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Jan 19 17:57:07 EST 2007
Author: rkern
Date: 2007-01-19 16:57:02 -0600 (Fri, 19 Jan 2007)
New Revision: 3514
Modified:
trunk/numpy/core/ma.py
Log:
Correct the .args attribute of MAError. It needs to be a tuple. Python 2.5 depends on this.
Modified: trunk/numpy/core/ma.py
===================================================================
--- trunk/numpy/core/ma.py 2007-01-19 07:01:20 UTC (rev 3513)
+++ trunk/numpy/core/ma.py 2007-01-19 22:57:02 UTC (rev 3514)
@@ -29,10 +29,14 @@
class MAError (Exception):
def __init__ (self, args=None):
"Create an exception"
+
+ # The .args attribute must be a tuple.
+ if not isinstance(args, tuple):
+ args = (args,)
self.args = args
def __str__(self):
"Calculate the string representation"
- return str(self.args)
+ return str(self.args[0])
__repr__ = __str__
class _MaskedPrintOption:
More information about the Numpy-svn
mailing list