Re: [Numpy-discussion] more complex matrix operation

2010-03-15 Thread josef . pktd
On Mon, Mar 15, 2010 at 9:58 AM, Gerardo Berbeglia wrote: > I have another matrix operations which seems a little more complicated. > > Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume > S is represented by a binary vector s, with a 1 at the index i if i is > in S. (e.g. if S=

Re: [Numpy-discussion] more complex matrix operation

2010-03-15 Thread Skipper Seabold
On Mon, Mar 15, 2010 at 10:58 AM, Gerardo Berbeglia wrote: > I have another matrix operations which seems a little more complicated. > > Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume > S is represented by a binary vector s, with a 1 at the index i if i is > in S. (e.g. if S

[Numpy-discussion] more complex matrix operation

2010-03-15 Thread Gerardo Berbeglia
I have another matrix operations which seems a little more complicated. Let A be an n x n matrix and let S be a subset of {0,...,n-1}. Assume S is represented by a binary vector s, with a 1 at the index i if i is in S. (e.g. if S={0,3} then s = [1,0,0,1]) I would like to have an efficient way to