On 7/26/07, Dan Christensen <[EMAIL PROTECTED]> wrote: > > There is no SAGE equivalent yet. > > I really miss the numpy syntax, including broadcasting. For example,
Naive question: what exactly is broadcasting, and how might it be useful in the context of SAGE? Probably it's something to add to the todo list. > a[1] is the second row SAGE does that, though it returns a new vector rather than a reference. Numpy has a cool r_[...] notation for making matrices -- any thoughts about that? Should SAGE implement it too? > a[1:3] is the subarray consisting of the second and third rows > a[:, 1] is the second column > a[:, 1:3] is the subarray consisting of the second and third columns > a[:, 1:3] += 2 adds 2 to each element in that subarray I can't see any real reason not to add this sort of functionality to SAGE. Maybe we could even consider making the generic dense matrices in SAGE have an underlying numpy representation (i.e., where we don't use our own underlying C representation of the data). > But there's a lot more you do, concisely and with the loops done in C. > > (Implicitly, I also like that numpy allows multiple views into the > same data.) > Cool. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---