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

Commit

Permalink
Trac #18454: Fix two confusing random_cone() examples.
Browse files Browse the repository at this point in the history
The docs for random_cone() contain two examples testing the output when
min_ambient_dim == max_ambient_dim and min_rays == max_rays. However,
the tests for these two conditions set all four parameters, obscuring
their purpose. This commit fixes those tests to set/check only the
relevant parameters.
  • Loading branch information
orlitzky committed Aug 3, 2015
1 parent 52a1e4b commit a0235dc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/sage/geometry/cone.py
Expand Up @@ -4256,17 +4256,20 @@ def random_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None,
sage: random_cone(max_ambient_dim=0, max_rays=0)
0-d cone in 0-d lattice N
We can predict the dimension when ``min_ambient_dim == max_ambient_dim``::
We can predict the ambient dimension when
``min_ambient_dim == max_ambient_dim``::
sage: set_random_seed()
sage: random_cone(min_ambient_dim=4, max_ambient_dim=4, min_rays=0, max_rays=0)
0-d cone in 4-d lattice N
sage: K = random_cone(min_ambient_dim=4, max_ambient_dim=4)
sage: K.lattice_dim()
4
Likewise for the number of rays when ``min_rays == max_rays``::
sage: set_random_seed()
sage: random_cone(min_ambient_dim=10, max_ambient_dim=10, min_rays=10, max_rays=10)
10-d cone in 10-d lattice N
sage: K = random_cone(min_rays=3, max_rays=3)
sage: K.nrays()
3
If we specify a lattice, then the returned cone will live in it::
Expand Down

0 comments on commit a0235dc

Please sign in to comment.