Opened 6 years ago
Closed 6 years ago
#21037 closed defect (fixed)
Polyhedron.integral_points() fails for nonrational polytopes
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage7.3 
Component:  geometry  Keywords:  
Cc:  tscrim, novoselt, dimpase, vdelecroix, vbraun, jdemeyer  Merged in:  
Authors:  Travis Scrimshaw  Reviewers:  Matthias Koeppe 
Report Upstream:  N/A  Work issues:  
Branch:  35eca5a (Commits, GitHub, GitLab)  Commit:  35eca5a6d70617c8e4970c8243b5425abee9acd4 
Dependencies:  Stopgaps: 
Description (last modified by )
sage: P = Polyhedron(vertices=((0, 0), (17,3))) + 1/1000*polytopes.regular_polygon(5) sage: P.integral_points() TypeError: int() argument must be a string or a number, not 'AlgebraicReal'
(This is an irrational polytope with a small bounding box. Sage should be able to enumerate it easily using the rectangular_box_points
method.)
Change History (9)
comment:1 Changed 6 years ago by
 Branch set to public/geometry/integral_points/non_rational_points21037
 Commit set to b09bea74cbccd98214b8f2879e4e619ab9cf1e9c
 Status changed from new to needs_review
comment:2 Changed 6 years ago by
 Commit changed from b09bea74cbccd98214b8f2879e4e619ab9cf1e9c to 35eca5a6d70617c8e4970c8243b5425abee9acd4
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
35eca5a  Fixing integral points for nonrational points.

comment:3 Changed 6 years ago by
 Description modified (diff)
comment:4 Changed 6 years ago by
 Description modified (diff)
 Reviewers set to Matthias Koeppe
 Status changed from needs_review to positive_review
Thanks for fixing this! I've moved the other item to #21041.
comment:5 Changed 6 years ago by
 Status changed from positive_review to needs_work
sage t long src/sage/geometry/integral_points.pyx ********************************************************************** File "src/sage/geometry/integral_points.pyx", line 539, in sage.geometry.integral_points.? Failed example: alarm(0.5); P.integral_points() Expected: Traceback (most recent call last): ... AlarmInterrupt Got: Exception cysignals.signals.AlarmInterrupt: AlarmInterrupt() in 'sage.geometry.integral_points.InequalityCollection.are_satisfied' ignored ((5, 8, 10, 15, 12, 9, 6, 3), (3, 5, 6, 9, 7, 5, 3, 1), (1, 3, 3, 5, 4, 3, 2, 1), (1, 2, 2, 3, 2, 1, 0, 0)) ********************************************************************** 1 item had failures: 1 of 51 in sage.geometry.integral_points.? [170 tests, 1 failure, 51.33 s]
comment:6 Changed 6 years ago by
 Cc jdemeyer added
IIRC, I also got that error sporadically when I was testing #18029 as well, but I don't seem to get that on develop. Jeroen, any ideas?
comment:7 Changed 6 years ago by
yes, the error is coming from #18029
comment:8 Changed 6 years ago by
 Status changed from needs_work to positive_review
comment:9 Changed 6 years ago by
 Branch changed from public/geometry/integral_points/non_rational_points21037 to 35eca5a6d70617c8e4970c8243b5425abee9acd4
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Just not enough error catching.
New commits:
Fixing integral points for nonrational points.