Skip to content

Commit

Permalink
Fix doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmtroffaes committed Sep 14, 2024
1 parent e84f276 commit da84c16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/source/cddgmp.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.. testsetup::

import cdd
import cdd.gmp
from fractions import Fraction

The :mod:`cdd.gmp` module
=========================

Expand All @@ -14,7 +20,7 @@ instead of :class:`float`, and all arithmetic is exact.
>>> cdd.gmp.matrix_from_array([[1.12]])
Traceback (most recent call last):
...
TypeError: value 1.12 is not Rational
TypeError: must be Fraction or int, not float

If the float represents a fraction, you must pass it as a fraction explicitly:

Expand Down

0 comments on commit da84c16

Please sign in to comment.