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

Commit

Permalink
Chart: Add coord_restrictions init arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 3, 2021
1 parent 473cd41 commit d9520ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions src/sage/manifolds/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,15 @@ class Chart(UniqueRepresentation, SageObject):
manifolds over `\RR`.
"""
def __init__(self, domain, coordinates='', names=None, calc_method=None):
@staticmethod
def __classcall__(cls, domain, coordinates='', names=None, calc_method=None,
coord_restrictions=None):

return super().__classcall__(cls, domain, coordinates, names, calc_method,
coord_restrictions)


def __init__(self, domain, coordinates, names, calc_method, coord_restrictions):
r"""
Construct a chart.
Expand Down Expand Up @@ -1576,7 +1584,7 @@ class RealChart(Chart):
:meth:`plot`.
"""
def __init__(self, domain, coordinates='', names=None, calc_method=None):
def __init__(self, domain, coordinates, names, calc_method, coord_restrictions):
r"""
Construct a chart on a real topological manifold.
Expand All @@ -1595,7 +1603,7 @@ def __init__(self, domain, coordinates='', names=None, calc_method=None):
"""
Chart.__init__(self, domain, coordinates=coordinates, names=names,
calc_method=calc_method)
calc_method=calc_method, coord_restrictions=coord_restrictions)
self._fast_valid_coordinates = None

def _init_coordinates(self, coord_list):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/manifolds/differentiable/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class DiffChart(Chart):
on differentiable manifolds over `\RR`.
"""
def __init__(self, domain, coordinates='', names=None, calc_method=None):
def __init__(self, domain, coordinates, names, calc_method, coord_restrictions):
r"""
Construct a chart.
Expand Down Expand Up @@ -942,7 +942,7 @@ class RealDiffChart(DiffChart, RealChart):
:meth:`~sage.manifolds.chart.RealChart.plot`.
"""
def __init__(self, domain, coordinates='', names=None, calc_method=None):
def __init__(self, domain, coordinates, names, calc_method, coord_restrictions):
r"""
Construct a chart on a real differentiable manifold.
Expand Down

0 comments on commit d9520ae

Please sign in to comment.