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

Commit

Permalink
fix PolyhedronFace.dim()
Browse files Browse the repository at this point in the history
  • Loading branch information
LaisRast committed Oct 25, 2019
1 parent 76b7fdd commit 4e5912d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sage/geometry/polyhedron/face.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,9 @@ def dim(self):
if self.n_ambient_Vrepresentation() == 0:
return -1
else:
origin = vector(self.ambient_Vrepresentation(0))
v_list = [ vector(v)-origin for v in self.ambient_Vrepresentation() ]
origin = self.vertices()[0].vector()
v_list = [vector(v)-origin for v in self.ambient_Vrepresentation() if v.is_vertex()]
v_list += [vector(v) for v in self.ambient_Vrepresentation() if v.is_ray() or v.is_line()]
return matrix(v_list).rank()

def _repr_(self):
Expand Down

0 comments on commit 4e5912d

Please sign in to comment.