#10478: line() does not accept iterators
------------------------+---------------------------------------------------
Reporter: ddrake | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-4.6.2
Component: graphics | Keywords: line plot iterator
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
The {{{line()}}} function fails when given an iterator:
{{{
sage: line(iter([(0,0), (1,0), (2,2)]))
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
[...]
/opt/sage/local/lib/python2.6/site-packages/sage/plot/plot.pyc in
xydata_from_point_list(points)
2529 pass
2530
-> 2531 if len(points)>0 and len(list(points[0]))!=2:
2532 raise ValueError, "points must have 2 coordinates in a 2d
line"
2533
TypeError: object of type 'listiterator' has no len()
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10478>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.