"William Stein" <[EMAIL PROTECTED]> writes:

> On 7/26/07, David Joyner <[EMAIL PROTECTED]> wrote:
>> On 7/26/07, mak <[EMAIL PROTECTED]> wrote:
>> > 1.  How do I change the entire row or column of a matrix at once?  In
>> > pari, I could do e.g. a=[1,2,3;4,5,6], and then put a[1,]=[0,0,0],
>> > which would give a=[0,0,0;4,5,6].  What's the sage equivalent?
>
> There is no SAGE equivalent yet.

I really miss the numpy syntax, including broadcasting.  For example,

  a[1]      is the second row
  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

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.)

Dan


--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to