On 3/23/07, Alexander Michael <[EMAIL PROTECTED]> wrote: > On 3/23/07, Nadav Horesh <[EMAIL PROTECTED]> wrote: > > How about > > > > a = empty((5,7,4)) > > c = a[...,-1] > > Solely because I want to use the array with code that assumes it is > working with two-dimensional arrays but yet only performs operations > on the "outer" two-dimensional array that would be consistent with an > "inner" array type (i.e. scalar assignment, element-wise > multiplication, etc.). I own all the code, so perhaps I can replace > a[mask,-1] with a[mask,-1,...] and such. Hmm. Not bad reminder, > thanks.
Hold on -- aren't the "..." at the *end* always implicit: I you have a.shape = (6,5,4,3) a[3,2] is the same as a[3,2,:,:] is the same as a[3,2,...] only if you wanted a[...,3,2] you would have to change your code !? Am I confused !? -Sebastian _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion