[SciPy-user] Numpy for Matlab users

Robert Cimrman cimrman3 at ntc.zcu.cz
Wed Feb 15 10:30:00 CST 2006


Robert Cimrman wrote:
> Nils Wagner wrote:
> 
>>Hi all,
>>
>>I am converting a Matlab code into  a numpy/scipy  code.
>>
>>How can I translate
>>
>>H(k+1,:) = [ ]
>>
>>into numpy ?
> 
> 
> H = H[:k+1,:] ?

Whoops, I see ':' even on places where are none... :)
nevertheless the idea holds - copy all you need:
H = H[indx,:], where indx are all indices except 'k+1'
or try to use the masked arrays.

r.



More information about the SciPy-user mailing list