Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To convert a python list to an r array you can try

sage: x = r.as_array( range(10) )
sage: x
[1] 0 1 2 3 4 5 6 7 8 9

To convert back x's _sage_() method might do the trick

sage: y = x._sage_()['DATA']
sage: y
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]