How to dynamically access Numeric subarrays

Gaubitzer Erwin a9605473 at unet.univie.ac.at
Wed Aug 4 05:48:01 EDT 2004


Hi at last

I found the solution myself
It was my fault not to look at the 
Python basics.
The indices in an array is a tuple!
So I am able to create automatically
such ones with standard operations
like

MyTuple = (0,0,2,slice(None),4)

(look at how to do the slice)
and also

MyOtherTuple += MyTuple + (2,)

or

QuickTuple = (0,)*5

and inserting it into an array

MyArrayWithIndices[MyTuple]



Thanks to all for thinking about it

Greetings
Erwin




More information about the Python-list mailing list