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

Commit

Permalink
undid change regarding strange conversion of normaliz Sublattice ou…
Browse files Browse the repository at this point in the history
…tput
  • Loading branch information
Jonathan Kliem committed Dec 26, 2019
1 parent 591d3b1 commit a349c8c
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/sage/geometry/polyhedron/backend_normaliz.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,8 @@ def rational_handler(list):

def nfelem_handler(coords):
# coords might be too short which is not accepted by Sage number field
list_coords = list(coords)
if len(coords) > 0 and isinstance(coords[0], list):
return list(nfelem_handler(y) for y in coords)
else:
v = list(coords) + [0] * (self._normaliz_field.degree() - len(coords))
return self._normaliz_field(v)

# There is a bug in pynormaliz when applying a NumberField handler to
if property == 'Sublattice' and not self._normaliz_field in (ZZ, QQ):
# Handling a bug in PyNormaliz.
rational_handler = nfelem_handler
v = list(coords) + [0] * (self._normaliz_field.degree() - len(coords))
return self._normaliz_field(v)

import PyNormaliz
return PyNormaliz.NmzResult(normaliz_cone, property,
Expand Down

0 comments on commit a349c8c

Please sign in to comment.