#16378: list_plot throws a TypeError with complex lists
----------------------------+------------------------
Reporter: bradlys | Owner: bradlys
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: graphics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+------------------------
Comment (by ppurka):
Sorry guys. Looks like I failed to notice this in #11787.
The reason to move away from
{{{
if not isinstance(data[0], (list, tuple)):
}}}
is because of the introduction of numpy arrays. The following would break
otherwise
{{{
sage: A = numpy.array([[1,2], [2,3], [3,4]])
sage: list_plot(A) # this is fine now with the RDF() check
sage: A[0] # even though A[0] is a two dimensional object...
array([1, 2]) # ... it is neither a tuple nor a list (see
below)
sage: isinstance(A[0], (list, tuple))
False
}}}
I went through many iterations in #11787 to completely avoid importing
numpy unnecessarily. I will be adding a patch shortly to check for
elements in `SR`.
--
Ticket URL: <http://trac.sagemath.org/ticket/16378#comment:10>
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.