How to dynamically access Numeric subarrays
a9605473 at unet.univie.ac.at
Tue Aug 3 13:29:44 CEST 2004
I wrote a short program which reads scientific data from
a file and stores its values in a Numeric array.
At the same time it reads the names of its dimensions which
are then in the same order as the indices of the Numeric
After then I want to access the data in the array by its name
the way that I keep all indices at constant values except the
one I want to read out which I am slicing.
The problem is that the input data varies in its dimensions
so my wanted data can appear at different positions of the
array. I tried to create a list with the slice on the appropriate position
to use it as indices list in the array but this failed.
So my questions to out there:
How can I extract a (Numeric Python) subarray whose indices
have to be built dynamically.
Thanks in advance
More information about the Python-list