Skip to content

Commit

Permalink
Simplify doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmtroffaes committed Sep 18, 2024
1 parent a7af3b3 commit 792fcd0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,8 @@ The next example is taken from
... [-7, 1, -5, 2], # -x+5y-2z<=-7
... [12, 3, -2, -6], # -3x+2y+6z<=12
... ]
>>> mat1 = cdd.matrix_from_array(array, rep_type=cdd.RepType.INEQUALITY)
>>> mat2 = cdd.fourier_elimination(mat1)
>>> mat2.array
>>> mat = cdd.matrix_from_array(array, rep_type=cdd.RepType.INEQUALITY)
>>> cdd.fourier_elimination(mat).array
[[-1.0, 0.0, -1.25], [-1.0, -1.0, -1.0], [-1.5, 1.0, -2.833333...]]
>>> mat3 = cdd.block_elimination(mat1, {3}) # equivalent to Fourier
>>> mat3.array
>>> cdd.block_elimination(mat, {3}).array
[[-4.0, 0.0, -5.0], [-1.5, -1.5, -1.5], [-9.0, 6.0, -17.0]]

0 comments on commit 792fcd0

Please sign in to comment.