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

Commit

Permalink
minimal extension only avoid AA if the base ring is not already AA
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Apr 16, 2021
1 parent 9f5560a commit f9faa02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10403,7 +10403,7 @@ def affine_hull_projection(self, as_polyhedron=None, as_affine_map=False, orthog

affine_hull = deprecated_function_alias(29326, affine_hull_projection)

def _test_affine_hull_projection(self, tester=None, **options):
def _test_affine_hull_projection(self, tester=None, verbose=False, **options):
"""
Run tests on the method :meth:`.affine_hull_projection`.
Expand Down Expand Up @@ -10440,6 +10440,8 @@ def _test_affine_hull_projection(self, tester=None, **options):
data_sets = data_sets[:1]

for i, data in enumerate(data_sets):
if verbose:
print("Running test number {}".format(i))
M = data['projection_map'][0].matrix().transpose()
tester.assertEqual(self.linear_transformation(M, new_base_ring=M.base_ring())
+ data['projection_map'][1],
Expand All @@ -10464,7 +10466,8 @@ def _test_affine_hull_projection(self, tester=None, **options):
tester.assertTrue((M.transpose() * M).is_one())
if i == 3:
# Test that the extension is indeed minimal.
tester.assertFalse(data['polyhedron'].base_ring() is AA)
if self.base_ring() is not AA:
tester.assertFalse(data['polyhedron'].base_ring() is AA)

def _polymake_init_(self):
"""
Expand Down

0 comments on commit f9faa02

Please sign in to comment.