mailr17736 - in /trunk/data: align_tensor.py diff_tensor.py


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

Header


Content

Posted by edward on October 08, 2012 - 00:48:
Author: bugman
Date: Mon Oct  8 00:48:50 2012
New Revision: 17736

URL: http://svn.gna.org/viewcvs/relax?rev=17736&view=rev
Log:
Fix for the fix of r17734 which attempted to fix r17733.

The Python version is now being detected.


Modified:
    trunk/data/align_tensor.py
    trunk/data/diff_tensor.py

Modified: trunk/data/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data/align_tensor.py?rev=17736&r1=17735&r2=17736&view=diff
==============================================================================
--- trunk/data/align_tensor.py (original)
+++ trunk/data/align_tensor.py Mon Oct  8 00:48:50 2012
@@ -24,6 +24,7 @@
 from math import cos, sin
 from numpy import array, dot, eye, float64, identity, transpose, zeros
 from numpy.linalg import det, eig, eigvals
+import sys
 
 # relax module imports.
 from compat import py_version
@@ -1348,7 +1349,8 @@
         """Set the value for an untouchable MC data structure."""
 
         # Python 3 fix - the value needs to now be a list?!
-        value = [value]
+        if sys.version_info[0] >= 3:
+            value = [value]
 
         # Set the value.
         list.__setitem__(self, slice_obj, value)

Modified: trunk/data/diff_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/data/diff_tensor.py?rev=17736&r1=17735&r2=17736&view=diff
==============================================================================
--- trunk/data/diff_tensor.py (original)
+++ trunk/data/diff_tensor.py Mon Oct  8 00:48:50 2012
@@ -24,6 +24,7 @@
 from re import search
 from math import cos, sin
 from numpy import array, float64, dot, identity, transpose, zeros
+import sys
 
 # relax module imports.
 from compat import py_version
@@ -1077,7 +1078,8 @@
         """Set the value for an untouchable MC data structure."""
 
         # Python 3 fix - the value needs to now be a list?!
-        value = [value]
+        if sys.version_info[0] >= 3:
+            value = [value]
 
         # Set the value.
         list.__setitem__(self, slice_obj, value)




Related Messages


Powered by MHonArc, Updated Mon Oct 08 11:20:02 2012