Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 01c5c19

Browse files
author
Jonathan Kliem
committed
improved docstring
1 parent 5771568 commit 01c5c19

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/sage/geometry/polyhedron/base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4439,11 +4439,14 @@ def stack(self, face, position=None):
44394439
sage: stack.backend()
44404440
'field'
44414441
4442-
The stacked vertex may not satisfy any inequality
4443-
defining the original polyhedron::
4442+
Taking the stacking vertex too far with the parameter `position`
4443+
may result in a failure to produce the desired
4444+
(combinatorial type of) polytope.
4445+
The interval of permittable values is always open.
4446+
This is the smallest non-permittable value::
44444447
44454448
sage: P = polytopes.octahedron()
4446-
sage: P.stack(P.faces(2)[0],4)
4449+
sage: P.stack(P.faces(2)[0], position=4)
44474450
Traceback (most recent call last):
44484451
...
44494452
ValueError: the chosen position is too large

src/sage/geometry/polyhedron/representation.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -466,20 +466,20 @@ def neighbors(self):
466466
467467
Checking that :trac:`28463` is fixed::
468468
469-
sage: P = polytopes.simplex()
470-
sage: F1 = P.Hrepresentation()[1]
471-
sage: list(F1.neighbors())
472-
[An inequality (0, 1, 0, 0) x + 0 >= 0,
473-
An inequality (0, 0, 1, 0) x + 0 >= 0,
474-
An inequality (0, 0, 0, 1) x + 0 >= 0]
469+
sage: P = polytopes.simplex()
470+
sage: F1 = P.Hrepresentation()[1]
471+
sage: list(F1.neighbors())
472+
[An inequality (0, 1, 0, 0) x + 0 >= 0,
473+
An inequality (0, 0, 1, 0) x + 0 >= 0,
474+
An inequality (0, 0, 0, 1) x + 0 >= 0]
475475
476476
Does not work for equalities::
477477
478-
sage: F0 = P.Hrepresentation()[0]
479-
sage: list(F0.neighbors())
480-
Traceback (most recent call last):
481-
...
482-
TypeError: must be inequality
478+
sage: F0 = P.Hrepresentation()[0]
479+
sage: list(F0.neighbors())
480+
Traceback (most recent call last):
481+
...
482+
TypeError: must be inequality
483483
"""
484484
# The adjacency matrix does not include equations.
485485
n_eqs = self.polyhedron().n_equations()

0 commit comments

Comments
 (0)