#12035: `list_plot` should accept lists of complex numbers
---------------------------+------------------------------------------------
Reporter: ddrake | Owner: jason, was
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.8
Component: graphics | Keywords: list_plot, complex
Work_issues: | Upstream: N/A
Reviewer: Keshav Kini | Author: Dan Drake
Merged: | Dependencies:
---------------------------+------------------------------------------------
Comment(by ddrake):
Okay, running `CC` on everything is a terrifically bad idea: here's the
current (4.7.2) behavior:
{{{
sage: foo = [random() for _ in range(1000)]
sage: %timeit p = list_plot(foo)
625 loops, best of 3: 596 µs per loop
sage: %timeit p = list_plot([CC(z) for z in foo])
125 loops, best of 3: 7.2 ms per loop
}}}
So, an order of magnitude slowdown. As suggested by William at
https://groups.google.com/d/topic/sage-devel/UiKTG3FkRwY/discussion, the
new patch (up shortly) just catches a TypeError, which preserves the
current speed for real input and neatly avoids the problem with `[int(1),
CC(2+I),...]`; complex input anywhere will throw the TypeError, which we
catch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12035#comment:11>
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.