Opened 4 years ago
Last modified 2 months ago
#22705 new enhancement
polymake: Resolve clashes between global polymake user functions, polymake methods, Sage methods
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | interfaces | Keywords: | days84 |
Cc: | SimonKing, jipilab, dimpase | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #24905 | Stopgaps: |
Description (last modified by )
Examples for current failures:
sage: polymake.application("tropical") sage: p = polymake.cartesian_product(polymake("uniform_linear_space<Max>(3,2)"), ....: polymake("uniform_linear_space<Max>(3,1)"))
Fails because cartesian_product
is a Sage method already.
sage: polymake.application("polytope") sage: c = polymake.cube(3) sage: c.save("cube3.poly")
Fails because save
is a Sage method already.
sage: polymake.application("tropical") sage: l = polymake("uniform_linear_space<Min>(3,2)") sage: l.bounding_box(1)
Clashes with the polymake global function of the same name.
Change History (10)
comment:1 Changed 4 years ago by
- Description modified (diff)
comment:2 Changed 2 years ago by
- Dependencies set to #24905
comment:3 Changed 2 years ago by
- Cc jipilab dimpase added
- Description modified (diff)
- Milestone changed from sage-8.0 to sage-8.8
- Summary changed from polymake: Make global polymake user functions such as 'save' available as methods to polymake: Resolve clashes between global polymake user functions, polymake methods, Sage methods
comment:4 Changed 22 months ago by
- Milestone sage-8.8 deleted
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
comment:5 follow-up: ↓ 7 Changed 21 months ago by
Docstring of PolymakeFunctionElement::__call__
:
We consider both member functions of an element and global functions bound to an element:: sage: p = polymake.rand_sphere(3, 13, seed=12) # optional - polymake sage: p.get_schedule('"VERTICES"') # optional - polymake # random sensitivity check for VertexPerm cdd.convex_hull.canon: POINTED, RAYS, LINEALITY_SPACE : INPUT_RAYS sage: p.minkowski_sum_fukuda(p).F_VECTOR # optional - polymake 13 33 22
Is this useful at all? This seems to cause the bounding_box
clash.
comment:6 Changed 21 months ago by
A workaround is to use
l.get_member_function("bounding_box")(1)
comment:7 in reply to: ↑ 5 Changed 21 months ago by
comment:8 Changed 12 months ago by
- Milestone set to sage-9.2
Moving some tickets to 9.2. This is not a promise that I will be working on them.
comment:9 Changed 8 months ago by
- Milestone changed from sage-9.2 to sage-9.3
comment:10 Changed 2 months ago by
- Milestone changed from sage-9.3 to sage-9.4
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
These functions are made available in #24905 .... but
save
is still not accessible - that's shadowed by the Sage method of the same name.