How to dynamically access Numeric subarrays

Gaubitzer Erwin a9605473 at unet.univie.ac.at
Wed Aug 4 04:39:19 EDT 2004


Hi again


For example I have an array AR whose shape is 
(2, 1, 2, 1, 100, 3).
and I want to access
AR[0,0,0,0,:,1]
which results in an rank 1 array with my wanted
numbers (more advanced I want to loop through another
index).

I can write it manually but I can't insert this
list of indices automatically, because the slice
notation gives me an error when given to a python list.

I tried to use take() but in my 6-dimensional array
I wasn't able to find the right parameter combination
to access the vector above.
Maybe one can give me the right notation.

Thanks again

Erwin



More information about the Python-list mailing list