#17264: Polyhedron function broken in sage-6.3 (worked in sage-6.2)
------------------------+----------------------------
Reporter: was | Owner:
Type: defect | Status: new
Priority: minor | Milestone: sage-6.4
Component: geometry | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+----------------------------
If you try to make the convex hull of a set of points given by float
coordinates using `Polyhedron`, this worked fine in Sage-6.2, but is
broken in Sage-6.3.
{{{
sage: Polyhedron([(0.8370682893845995r, 0.2027977776670088r,
0.2547890063224252r)])
AttributeError: type object 'float' has no attribute 'fraction_field'
sage: Polyhedron([(0.8370682893845995, 0.2027977776670088,
0.2547890063224252)])
A 0-dimensional polyhedron in (Real Field with 54 bits of precision)^3
defined as the convex hull of 1 vertex
}}}
I noticed when making this interact:
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-
a18c706e8bcd/files/support/2014-10-30-105145-convex-hull-interact.sagews
This is also still broken in sage-6.4.rc0:
{{{
/scratch/wstein/sage-6.4.rc0$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.4.rc0, Release Date: 2014-10-30 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: Polyhedron([(0.8370682893845995r, 0.2027977776670088r,
0.2547890063224252r)])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-1-69a05f87fbc6> in <module>()
----> 1 Polyhedron([(0.8370682893845995, 0.2027977776670088,
0.2547890063224252)])
/scratch/wstein/sage-6.4.rc0/local/lib/python2.7/site-
packages/sage/misc/lazy_import.so in
sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/laz
y_import.c:3230)()
/scratch/wstein/sage-6.4.rc0/local/lib/python2.7/site-
packages/sage/misc/decorators.pyc in wrapper(*args, **kwds)
703 kwds[new_name] = kwds[old_name]
704 del kwds[old_name]
--> 705 return func(*args, **kwds)
706
707 return wrapper
/scratch/wstein/sage-6.4.rc0/local/lib/python2.7/site-
packages/sage/geometry/polyhedron/constructor.pyc in Polyhedron(vertices,
rays, lines, ieqs, eqns, ambient_dim
, base_ring, minimize, verbose, backend)
444 # Specific backends can override the base_ring
445 from sage.geometry.polyhedron.parent import Polyhedra
--> 446 parent = Polyhedra(base_ring, ambient_dim, backend=backend)
447 base_ring = parent.base_ring()
448
/scratch/wstein/sage-6.4.rc0/local/lib/python2.7/site-
packages/sage/geometry/polyhedron/parent.pyc in Polyhedra(base_ring,
ambient_dim, backend)
84 return Polyhedra_RDF_cdd(RDF, ambient_dim)
85 elif backend == 'field':
---> 86 return Polyhedra_field(base_ring.fraction_field(),
ambient_dim)
87 else:
88 raise ValueError('No such backend (='+str(backend)+
AttributeError: type object 'float' has no attribute 'fraction_field'
sage:
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17264>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.