mailr16528 - /branches/uf_redesign/arg_check.py


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

Header


Content

Posted by edward on May 30, 2012 - 10:11:
Author: bugman
Date: Wed May 30 10:11:44 2012
New Revision: 16528

URL: http://svn.gna.org/viewcvs/relax?rev=16528&view=rev
Log:
The arg_check.is_float_matrix() fn can now handle empty lists.


Modified:
    branches/uf_redesign/arg_check.py

Modified: branches/uf_redesign/arg_check.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/arg_check.py?rev=16528&r1=16527&r2=16528&view=diff
==============================================================================
--- branches/uf_redesign/arg_check.py (original)
+++ branches/uf_redesign/arg_check.py Wed May 30 10:11:44 2012
@@ -214,6 +214,10 @@
     if not isinstance(arg, list) and not isinstance(arg, ndarray):
         fail = True
 
+    # Fail on empty lists.
+    elif not len(arg):
+        fail = True
+
     # Fail if not a matrix.
     elif not isinstance(arg[0], list) and not isinstance(arg[0], ndarray):
         fail = True




Related Messages


Powered by MHonArc, Updated Wed May 30 10:40:02 2012