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

Commit

Permalink
added optional tag; small improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jun 10, 2020
1 parent cb13ddb commit 002e543
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/geometry/polyhedron/backend_normaliz.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ def _convert_to_pynormaliz(x):
Check that :trac:`29836` is fixed::
sage: P = polytopes.simplex(backend='normaliz')
sage: K.<sqrt2> = QuadraticField(2)
sage: P = polytopes.simplex(backend='normaliz') # optional - pynormaliz
sage: K.<sqrt2> = QuadraticField(2) # optional - pynormaliz
sage: P.dilation(sqrt2)
A 3-dimensional polyhedron in (Number Field in sqrt2 with defining polynomial x^2 - 2 with sqrt2 = 1.41...)^4 defined as the convex hull of 4 vertices
"""
Expand All @@ -345,7 +345,7 @@ def _QQ_pair(x):
return [ int(x.numerator()), int(x.denominator())]
from sage.rings.rational import Rational
from types import GeneratorType
if isinstance(x, list) or isinstance(x, tuple) or isinstance(x, GeneratorType):
if isinstance(x, (list, tuple, GeneratorType)):
return [ Polyhedron_normaliz._convert_to_pynormaliz(y) for y in x ]
try:
return int(ZZ(x))
Expand Down

0 comments on commit 002e543

Please sign in to comment.