Cool. This is exactly what I'm searching for. But
> this is not really a Python syntax... The coma in the
> square brackets is not standard for lists. Maybe this
> come from the array type ?
Yes, this is Numeric/numarray slicing, not list slicing. When you get
some time, you should read the pdf Numeric or numarray documentation.
It's comprehensive and very good.
Numarray also offers enhanced indexing ( Numeric does not yet) which
is a convenience you probably expect coming from matlab. Eg, you can
index an array with a sequence of integers (you must be careful that
the sequence is not a tuple however; lists or arrays of ints are ok)
>>> import numarray as na
>>> a = na.arange(0.0, 2.0, 0.1)
>>> ind = [2,5,7]
array([ 0.2, 0.5, 0.7])