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

Commit

Permalink
fix a variable name and add a doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jun 19, 2021
1 parent bacc3e8 commit 9cbd015
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6966,6 +6966,13 @@ def join_of_Vrep(self, *Vrepresentatives):
sage: P.join_of_Vrep(2, P.vertices()[3], P.Vrepresentation(4))
A 2-dimensional face of a Polyhedron in ZZ^5 defined as the convex hull of 6 vertices
::
sage: P = polytopes.cube()
sage: a, b = P.faces(0)[:2]
sage: P.join_of_Vrep(a, b)
A 1-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 2 vertices
In case of an unbounded polyhedron, the join may not be well-defined::
sage: P = Polyhedron(vertices=[[1,0], [0,1]], rays=[[1,1]])
Expand All @@ -6987,7 +6994,7 @@ def join_of_Vrep(self, *Vrepresentatives):

new_indices = [0]*len(Vrepresentatives)
for i, v in enumerate(Vrepresentatives):
if isinstance(v, PolyhedronFace) and facet.dim() == 0:
if isinstance(v, PolyhedronFace) and v.dim() == 0:
v = v.ambient_V_indices()[0]

if v in ZZ:
Expand Down

0 comments on commit 9cbd015

Please sign in to comment.