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

Commit

Permalink
TensorFreeSubmoduleBasis_comp._repr_: New
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Aug 27, 2022
1 parent fd5ba8c commit 694e665
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/sage/tensor/modules/tensor_free_submodule_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ def __init__(self, tensor_module, symbol, latex_symbol=None, indices=None,
self._base_module_basis = base_module_basis
self._comp = tensor_module._basis_comp()

def _repr_(self):
r"""
Return a string representation of ``self``.
EXAMPLES::
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
sage: e = M.basis('e')
sage: T11 = M.tensor_module(1,1)
sage: e_T11 = T11.basis('e')
sage: e_T11
Standard basis on the
Free module of type-(1,1) tensors on the Rank-3 free module M over the Integer Ring
induced by Basis (e_0,e_1,e_2) on the Rank-3 free module M over the Integer Ring
"""
return f"Standard basis on the {self._fmodule} induced by {self._base_module_basis}"

def keys(self):
"""
Return an iterator for the keys (indices) of the family.
Expand Down

0 comments on commit 694e665

Please sign in to comment.