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

Commit

Permalink
FiniteRankFreeModule_abstract.tensor_product: Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 2, 2022
1 parent 644933a commit 45bf6f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sage/tensor/modules/finite_rank_free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,12 @@ def tensor_product(self, *others):
raise NotImplementedError('all factors must be tensor modules over the same base module')
factors = [self] + list(others)
result_tensor_type = sum(vector(factor.tensor_type()) for factor in factors)
index_maps = []
running_indices = vector([0, result_tensor_type[0]])
result_sym = []
result_antisym = []
# Keep track of reordering of the contravariant and covariant indices
# (compatible with FreeModuleTensor.__mul__)
index_maps = []
running_indices = vector([0, result_tensor_type[0]])
for factor in factors:
tensor_type = factor.tensor_type()
index_map = tuple(i + running_indices[0] for i in range(tensor_type[0]))
Expand Down

0 comments on commit 45bf6f3

Please sign in to comment.