On Dec 29, 2008, at 5:23 PM, John Cremona wrote:
> > Maybe I missed the point here but after The point was a minor one... > R.<x1,x2>=QQ[] > M=matrix(R,1,2,[x1+x2,x1*x2]) > > you can get at the entries like this: > sage: M[0,0] > x1 + x2 > sage: M[0,1] > x1*x2 For the OP, it was surprising that "list(M)" did not return a list of the entries of M. The reason is that (for Python, I think), M is a list of "rows". The expression "M.list()" does return a list of the entries of M, which is what one might naively expect of the former expression. In the world of objects, its not always clear what the object is, I guess. Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---