#8719: convert RDF/CDF matrices to numpy
------------------------------+---------------------------------------------
   Reporter:  jason           |       Owner:  jason, was
       Type:  enhancement     |      Status:  new       
   Priority:  major           |   Milestone:  sage-4.4  
  Component:  linear algebra  |    Keywords:            
     Author:                  |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------
 This patch makes the following work:

 {{{
             sage: import numpy
             sage: m = matrix(RDF, 2, range(6)); m
             [0.0 1.0 2.0]
             [3.0 4.0 5.0]
             sage: numpy.array(m)
             array([[ 0.,  1.,  2.],
             [ 3.,  4.,  5.]])
             sage: numpy.array(m).dtype
             dtype('float64')
             sage: m = matrix(CDF, 2, range(6)); m
             [  0 1.0 2.0]
             [3.0 4.0 5.0]
             sage: numpy.array(m)
             array([[ 0.+0.j,  1.+0.j,  2.+0.j],
             [ 3.+0.j,  4.+0.j,  5.+0.j]])
             sage: numpy.array(m).dtype
             dtype('complex128')
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8719>
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.

Reply via email to