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

Commit

Permalink
ConvexSet_base.codimension: Add doctest for alias 'codim'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jun 12, 2021
1 parent f4bdffd commit 142fb46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sage/geometry/convex_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ def codimension(self):
r"""
Return the codimension of ``self``.
An alias is :meth:`codim`.
EXAMPLES::
sage: Polyhedron(vertices=[(1,2,3)], rays=[(1,0,0)]).codimension()
sage: P = Polyhedron(vertices=[(1,2,3)], rays=[(1,0,0)])
sage: P.codimension()
2
An alias is :meth:`codim`::
sage: P.codim()
2
"""
return self.ambient_dim() - self.dim()
Expand Down

0 comments on commit 142fb46

Please sign in to comment.