mailr10072 - /1.3/arg_check.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 08, 2009 - 16:40:
Author: bugman
Date: Tue Dec  8 16:40:17 2009
New Revision: 10072

URL: http://svn.gna.org/viewcvs/relax?rev=10072&view=rev
Log:
The arg_check.is_num_list() now will allow numpy arrays.


Modified:
    1.3/arg_check.py

Modified: 1.3/arg_check.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/arg_check.py?rev=10072&r1=10071&r2=10072&view=diff
==============================================================================
--- 1.3/arg_check.py (original)
+++ 1.3/arg_check.py Tue Dec  8 16:40:17 2009
@@ -23,6 +23,9 @@
 # Module docstring.
 """Argument checking functions for the relax user functions."""
 
+# Python module imports.
+from numpy import ndarray
+
 # relax module imports.
 from relax_errors import RelaxBoolError, RelaxFloatError, 
RelaxFunctionError, RelaxIntError, RelaxIntListIntError, RelaxNoneFloatError, 
RelaxNoneFunctionError, RelaxListNumError, RelaxListStrError, 
RelaxNoneIntError, RelaxNoneIntListIntError, RelaxNoneListNumError, 
RelaxNoneListStrError, RelaxNoneNumError, RelaxNoneNumStrListNumStrError, 
RelaxNoneNumTupleNumError, RelaxNoneStrError, RelaxNoneStrFileError, 
RelaxNoneStrListNumError, RelaxNoneStrListStrError, RelaxNumError, 
RelaxNumStrListNumStrError, RelaxNumTupleNumError, RelaxStrError, 
RelaxStrFileError, RelaxStrListNumError, RelaxStrListStrError, 
RelaxTupleError, RelaxTupleNumError
 from relax_io import DummyFileObject
@@ -320,7 +323,7 @@
         return
 
     # Fail if not a list.
-    if not isinstance(arg, list):
+    if not isinstance(arg, list) and not isinstance(arg, ndarray):
         fail = True
 
     # Other checks.




Related Messages


Powered by MHonArc, Updated Tue Dec 08 17:00:02 2009