| 1 | initial version |
I could not find any change_ring method or similar, but you can to the following by changing the ring of the vertices (note the transpose since the vertices are given as columns not rows):
sage: R = Polyhedron((2*P).vertices_matrix().transpose().change_ring(ZZ))
sage: R
A 2-dimensional polyhedron in ZZ^3 defined as the convex hull of 4 vertices
sage: 2*P
A 2-dimensional polyhedron in QQ^3 defined as the convex hull of 4 vertices
sage: R == 2*P
True
| 2 | No.2 Revision |
I could not find any change_ring method or similar, but you can to the following by changing the ring of the vertices (note the transpose since the vertices are given as columns not rows):
sage: R = Polyhedron((2*P).vertices_matrix().transpose().change_ring(ZZ))
sage: R
A 2-dimensional polyhedron in ZZ^3 defined as the convex hull of 4 vertices
sage: 2*P
A 2-dimensional polyhedron in QQ^3 defined as the convex hull of 4 vertices
sage: R == 2*P
True
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.