Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit a1b9630

Browse files
author
LBrunswic
committed
python2 compatibility
1 parent fde9245 commit a1b9630

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sage/tensor/modules/tensor_with_indices.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,14 +931,15 @@ def permute_indices(self, permutation):
931931
swap_params = list(combinations(range(self._tensor.tensor_rank()+1), 3))
932932

933933
# The associated permutation is as follows
934-
def swap(i,j,k,N):
934+
def swap(param,N):
935+
i,j,k = param
935936
L = list(range(1,N+1))
936937
L = L[:i] + L[j:k] + L[i:j] + L[k:]
937938
return L
938939

939940
# Construction of the permutation group generated by swaps
940941
perm_group = PermutationGroup(
941-
[swap(*param, self._tensor.tensor_rank()) for param in swap_params],
942+
[swap(param, self._tensor.tensor_rank()) for param in swap_params],
942943
canonicalize = False
943944
)
944945
# Compute a decomposition of the permutation as a product of swaps

0 commit comments

Comments
 (0)