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

Commit

Permalink
Trac #18696: Fix reviewer's suggestions.
Browse files Browse the repository at this point in the history
* Remove extra newline (per PEP 8) before the new method.
* Remove trailing newling in the docstring.
* Use a compound comparison in a doctest.
* Change the word "compute" to "return" in the method docs.
  • Loading branch information
orlitzky committed Aug 16, 2015
1 parent ed422e3 commit d3eb1c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/sage/geometry/cone.py
Expand Up @@ -4120,10 +4120,9 @@ def is_full_space(self):
"""
return self.linear_subspace() == self.lattice().vector_space()


def lineality(self):
r"""
Compute the lineality of this cone.
Return the lineality of this cone.
The lineality of a cone is the dimension of the largest linear
subspace contained in that cone.
Expand Down Expand Up @@ -4182,7 +4181,7 @@ def lineality(self):
sage: l = K.lineality()
sage: l in ZZ
True
sage: (0 <= l) and (l <= K.lattice_dim())
sage: 0 <= l <= K.lattice_dim()
True
A strictly convex cone should have lineality zero::
Expand All @@ -4191,7 +4190,6 @@ def lineality(self):
sage: K = random_cone(max_ambient_dim = 8, strictly_convex = True)
sage: K.lineality()
0
"""
return self.linear_subspace().dimension()

Expand Down

0 comments on commit d3eb1c9

Please sign in to comment.