Opened 19 months ago
Closed 17 months ago
#31820 closed defect (fixed)
Fix pickling of normaliz representation objects
Reported by: | gh-kliem | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | geometry | Keywords: | normaliz, pickling |
Cc: | Jean-Philippe Labbé, Matthias Köppe, Volker Braun | Merged in: | |
Authors: | Jonathan Kliem | Reviewers: | Matthias Koeppe |
Report Upstream: | N/A | Work issues: | |
Branch: | public/31820 (Commits, GitHub, GitLab) | Commit: | 5e65a5e65dee0d4f9a4d35ac3a081f3ca5adc90a |
Dependencies: | Stopgaps: |
Description
The normaliz cone is recreated after loading a saved normaliz polyhedron. Unfortunatly, it is recreated from the representation objects and not from the corresponding vectors. This leads to circular dependencies that are not always successfully resolved:
sage: P = polytopes.cube(backend='normaliz') sage: v = P.Vrepresentation()[0] sage: v1 = loads(v.dumps()) Traceback (most recent call last) ... ~/Applications/sage/local/lib/python3.8/site-packages/sage/geometry/polyhedron/representation.py in __getitem__(self, i) 83 2 84 """ ---> 85 return self._vector[i] 86 87 def __hash__(self): AttributeError: 'Vertex' object has no attribute '_vector'
We fix this by initialization of the cone from the vectors instead.
Change History (4)
comment:1 Changed 19 months ago by
Branch: | → public/31820 |
---|---|
Commit: | → 5e65a5e65dee0d4f9a4d35ac3a081f3ca5adc90a |
Keywords: | normaliz pickling added |
Status: | new → needs_review |
comment:2 Changed 19 months ago by
Reviewers: | → Matthias Koeppe |
---|---|
Status: | needs_review → positive_review |
comment:4 Changed 17 months ago by
Cc: | Volker Braun added |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Apparently this was merged as part of #31821.
Note: See
TracTickets for help on using
tickets.
New commits:
fix pickling of representation objects with backend normaliz
add doctest