#4431: [with patch, needs review] conversion of maxima matrices to sage matrices
-------------------------+--------------------------------------------------
 Reporter:  whuss        |       Owner:  whuss     
     Type:  enhancement  |      Status:  new       
 Priority:  minor        |   Milestone:  sage-3.2.1
Component:  interfaces   |    Keywords:            
-------------------------+--------------------------------------------------
 This patch implements conversion of Maxima matrices, to Sage matrices. The
 patch is based on
 sage-3.2alpha1.

 A sample session:
 {{{
 sage: var('x,y')
 sage: v = maxima('v: vandermonde_matrix([x, y, 1/2])')
 sage: v
 matrix([1,x,x^2],[1,y,y^2],[1,1/2,1/4])
 sage: type(v)
 <class 'sage.interfaces.maxima.MaximaElement'>
 sage: v.sage()

 [  1   x x^2]
 [  1   y y^2]
 [  1 1/2 1/4]
 sage: mlist = maxima('[v, sin(x), 1, v.v]').sage()
 sage: mlist

 [[  1   x x^2]
 [  1   y y^2]
 [  1 1/2 1/4],
     sin(x),
     1,
     [       x^2 + x + 1    x*y + x^2/2 + x    x*y^2 + 5*x^2/4]
 [       y^2 + y + 1        3*y^2/2 + x  y^3 + y^2/4 + x^2]
 [               7/4      y/2 + x + 1/8 y^2/2 + x^2 + 1/16]]
 sage: [parent(i) for i in mlist]

 [Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring,
     Symbolic Ring,
     Symbolic Ring,
     Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring]
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4431>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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