[Numpy-discussion] Array of Arrays

Alexander Michael lxander.m@gmail....
Fri Mar 23 10:22:09 CDT 2007

On 3/23/07, Nadav Horesh <nadavh@visionsense.com> 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,

More information about the Numpy-discussion mailing list