Author: bugman Date: Fri Nov 30 14:18:12 2012 New Revision: 18061 URL: http://svn.gna.org/viewcvs/relax?rev=18061&view=rev Log: Fix for bug #20338 (https://gna.org/bugs/?20338), the new tensor name is now set. Modified: trunk/generic_fns/align_tensor.py Modified: trunk/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/align_tensor.py?rev=18061&r1=18060&r2=18061&view=diff ============================================================================== --- trunk/generic_fns/align_tensor.py (original) +++ trunk/generic_fns/align_tensor.py Fri Nov 30 14:18:12 2012 @@ -113,13 +113,11 @@ @param tensor_from: The identification string of the alignment tensor to copy the data from. @type tensor_from: str - @param pipe_from: The data pipe to copy the alignment tensor data from. This defaults to the - current data pipe. + @param pipe_from: The data pipe to copy the alignment tensor data from. This defaults to the current data pipe. @type pipe_from: str @param tensor_to: The identification string of the alignment tensor to copy the data to. @type tensor_to: str - @param pipe_to: The data pipe to copy the alignment tensor data to. This defaults to the - current data pipe. + @param pipe_to: The data pipe to copy the alignment tensor data to. This defaults to the current data pipe. @type pipe_to: str """ @@ -158,8 +156,12 @@ # Copy the data. if index_to == None: dp_to.align_tensors.append(deepcopy(dp_from.align_tensors[index_from])) + index_to = len(dp_to.align_tensors) - 1 else: dp_to.align_tensors[index_to] = deepcopy(dp_from.align_tensors[index_from]) + + # Update the tensor's name. + dp_to.align_tensors[index_to].set('name', tensor_to) def data_names():