Re: [Numpy-discussion] slicing suggestion

2006-10-23 Thread Keith Goodman
On 10/23/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Keith Goodman wrote: > > On 10/20/06, JJ <[EMAIL PROTECTED]> wrote: > > > >> My suggestion is to > >> create a new attribute, such as .AR, so that the > >> following could be used: M[K.AR,:] > >> > > > > It would be even better if M[K,:] wor

Re: [Numpy-discussion] slicing suggestion

2006-10-23 Thread Travis Oliphant
Keith Goodman wrote: > On 10/20/06, JJ <[EMAIL PROTECTED]> wrote: > >> My suggestion is to >> create a new attribute, such as .AR, so that the >> following could be used: M[K.AR,:] >> > > It would be even better if M[K,:] worked. Would such a patch be > accepted? (Not that I know how to mak

Re: [Numpy-discussion] slicing suggestion

2006-10-23 Thread Travis Oliphant
JJ wrote: > Hello. > I have a suggestion that might make slicing using > matrices more user-friendly. I often have a matrix of > row or column numbers that I wish to use as a slice. > If K was a matrix of row numbers (nx1) and M was a nxm > matrix, then I would use ans = M[K.A.ravel(),:] to >

Re: [Numpy-discussion] slicing suggestion

2006-10-20 Thread Keith Goodman
On 10/20/06, JJ <[EMAIL PROTECTED]> wrote: > My suggestion is to > create a new attribute, such as .AR, so that the > following could be used: M[K.AR,:] It would be even better if M[K,:] worked. Would such a patch be accepted? (Not that I know how to make it.)