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

Commit c085d30

Browse files
author
Matthias Koeppe
committed
Polyhedron_base.interior: Handle the empty polyhedron correctly
1 parent 6ab5677 commit c085d30

File tree

1 file changed

+8
-0
lines changed
  • src/sage/geometry/polyhedron

1 file changed

+8
-0
lines changed

src/sage/geometry/polyhedron/base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8425,7 +8425,15 @@ def interior(self):
84258425
sage: P_lower.interior()
84268426
The empty polyhedron in ZZ^2
84278427
8428+
TESTS::
8429+
8430+
sage: Empty = Polyhedron(ambient_dim=2); Empty
8431+
The empty polyhedron in ZZ^2
8432+
sage: Empty.interior() is Empty
8433+
True
84288434
"""
8435+
if self.is_open():
8436+
return self
84298437
if not self.is_full_dimensional():
84308438
return self.parent().element_class(self.parent(), None, None)
84318439
return self.relative_interior()

0 commit comments

Comments
 (0)