mailr9243 - /1.3/generic_fns/align_tensor.py


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

Header


Content

Posted by edward on July 15, 2009 - 18:27:
Author: bugman
Date: Wed Jul 15 18:27:37 2009
New Revision: 9243

URL: http://svn.gna.org/viewcvs/relax?rev=9243&view=rev
Log:
Only add a new tensor object if the tensor doesn't already exist.


Modified:
    1.3/generic_fns/align_tensor.py

Modified: 1.3/generic_fns/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/align_tensor.py?rev=9243&r1=9242&r2=9243&view=diff
==============================================================================
--- 1.3/generic_fns/align_tensor.py (original)
+++ 1.3/generic_fns/align_tensor.py Wed Jul 15 18:27:37 2009
@@ -465,8 +465,9 @@
         if not hasattr(cdp, 'align_tensors'):
             cdp.align_tensors = AlignTensorList()
 
-        # Add the tensor.
-        cdp.align_tensors.add_item(tensor)
+        # Add the tensor, if it doesn't already exist.
+        if tensor not in cdp.align_tensors.names():
+            cdp.align_tensors.add_item(tensor)
 
     # Get the tensor.
     tensor_obj = get_tensor_object(tensor)




Related Messages


Powered by MHonArc, Updated Wed Jul 15 19:40:03 2009