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

Commit

Permalink
DifferentiableManifold.tangent_space, TangentSpace: Accept keyword 'b…
Browse files Browse the repository at this point in the history
…ase_ring'
  • Loading branch information
mkoeppe committed Aug 28, 2022
1 parent b79aebe commit aaf46cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/sage/manifolds/differentiable/manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@ def is_manifestly_parallelizable(self):
"""
return bool(self._covering_frames)

def tangent_space(self, point):
def tangent_space(self, point, base_ring=None):
r"""
Tangent space to ``self`` at a given point.
Expand All @@ -3412,6 +3412,8 @@ def tangent_space(self, point):
- ``point`` -- :class:`~sage.manifolds.point.ManifoldPoint`;
point `p` on the manifold
- ``base_ring`` -- (default: the symbolic ring) the base ring
OUTPUT:
- :class:`~sage.manifolds.differentiable.tangent_space.TangentSpace`
Expand Down Expand Up @@ -3445,7 +3447,7 @@ def tangent_space(self, point):
raise TypeError("{} is not a manifold point".format(point))
if point not in self:
raise ValueError("{} is not a point on the {}".format(point, self))
return TangentSpace(point)
return TangentSpace(point, base_ring=base_ring)

def curve(self, coord_expression, param, chart=None,
name=None, latex_name=None):
Expand Down
6 changes: 4 additions & 2 deletions src/sage/manifolds/differentiable/tangent_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class TangentSpace(FiniteRankFreeModule):
"""
Element = TangentVector

def __init__(self, point):
def __init__(self, point, base_ring=None):
r"""
Construct the tangent space at a given point.
Expand All @@ -243,7 +243,9 @@ def __init__(self, point):
latex_name = r"T_{%s}\,%s"%(point._latex_name, manif._latex_name)
self._point = point
self._manif = manif
FiniteRankFreeModule.__init__(self, SR, manif._dim, name=name,
if base_ring is None:
base_ring = SR
FiniteRankFreeModule.__init__(self, base_ring, manif._dim, name=name,
latex_name=latex_name,
start_index=manif._sindex)
# Initialization of bases of the tangent space from existing vector
Expand Down

0 comments on commit aaf46cc

Please sign in to comment.