#8719: convert RDF/CDF matrices to numpy
------------------------------+---------------------------------------------
   Reporter:  jason           |       Owner:  jason       
       Type:  enhancement     |      Status:  needs_review
   Priority:  major           |   Milestone:  sage-4.4.2  
  Component:  linear algebra  |    Keywords:              
     Author:  Jason Grout     |    Upstream:  N/A         
   Reviewer:                  |      Merged:              
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by rbeezer):

 Hi Jason,

 So you have defined a new method "{{{__array__}}}" for a Sage matrix
 object.  When somebody calls numpy.array(a) for a Sage matrix  a  then
 this {{{__array__}}} method gets called (and this is in effect just the
 numpy() method of a Sage matrix)?  In other words, the numpy.array()
 method has an expanded reportoire and now "knows" how to deal with a Sage
 matrix object?

 If so, could you say so?  The line  {{{__array__=numpy}}} all by itself
 looks really mysterious with no documentation.  And the new doctests say
 "you could use numpy" - when Sage is really doing the heavy-lifting?  It
 sounds like numpy is doing the work, when this is not a standard behavior
 of numpy.

 So I'm suggesting maybe this seemingly circular arrrangement (modify Sage
 matrices, so numpy can deal with them, using a Sage function to convert to
 a numpy array) could be better explained so nobody messes it up or gets
 too confused.  With the added code and the added doctests all together, I
 think I was able to figure this out - otherwise it would have been a head-
 scratcher.

 Rob

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