mailr16478 - /branches/uf_redesign/gui/string_conv.py


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

Header


Content

Posted by edward on May 28, 2012 - 13:58:
Author: bugman
Date: Mon May 28 13:58:19 2012
New Revision: 16478

URL: http://svn.gna.org/viewcvs/relax?rev=16478&view=rev
Log:
The gui.string_conv.list_to_gui() function can now handle numpy arrays.


Modified:
    branches/uf_redesign/gui/string_conv.py

Modified: branches/uf_redesign/gui/string_conv.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/string_conv.py?rev=16478&r1=16477&r2=16478&view=diff
==============================================================================
--- branches/uf_redesign/gui/string_conv.py (original)
+++ branches/uf_redesign/gui/string_conv.py Mon May 28 13:58:19 2012
@@ -26,6 +26,7 @@
 
 # Python module imports.
 from math import pow
+from numpy import ndarray
 from string import split
 
 # relax module imports.
@@ -342,6 +343,10 @@
     if list == None:
         list = ''
 
+    # Handle numpy arrays.
+    if isinstance(list, ndarray):
+        list = list.tolist()
+
     # Convert.
     return unicode(list)
 




Related Messages


Powered by MHonArc, Updated Mon May 28 15:00:02 2012