Hello, On Wed, May 20, 2009 at 12:31 PM, Jurgis Pralgauskis <jurgis.pralgaus...@gmail.com> wrote: > > Hello, > > what would be the best (and shortest) way to convert > sage matrix (like matrix([[1, 2], [3, 4]]) ) > > to numpy array: > numpy.array([[1, 2], [3, 4]])
You can do the following: sage: m = matrix([[1, 2], [3, 4]]) sage: m.numpy() array([[1, 2], [3, 4]], dtype=object) sage: m.numpy(float) array([[ 1., 2.], [ 3., 4.]]) sage: m.numpy(int) array([[1, 2], [3, 4]]) > or is there any other way to multiply sage matrix per member ? There is currently not a way to do this (primarily since it doesn't really come up in linear algebra.) --Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---