vector subscripts in Python?

Mike C. Fletcher mcfletch at rogers.com
Thu Jun 12 01:37:36 CEST 2003


Mike Rovner wrote:

><beliavsky at aol.com> wrote in message
>  
>
>>Does Python have the equivalent of "vector subscripts" of Fortran 95?
>>    
>>
>
>Not directly.
>
True, but the Numeric Python extension does: the take function :) .

 >>> ii = [0,2]
 >>> xx = [1,4,9]
 >>> from Numeric import take
 >>> take( xx, ii )
array([1, 9])
 >>>

All good Fortran converts use Numeric Python, right :) .

Have fun,
Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/








More information about the Python-list mailing list