A question about numpy

Paulo da Silva p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Tue Apr 14 20:03:35 EDT 2015


On 14-04-2015 23:49, Rob Gaddi wrote:
> On Tue, 14 Apr 2015 23:41:56 +0100, Paulo da Silva wrote:
> 
>> Supposing I have 2 vectors v1 and v2 and a value (constant) k.
>> I want to build a vector r with all values of v1 greater than k and the
>> others from v2.
>>
> 
> You're looking for numpy.where() .
> 
That's it! Thank you.




More information about the Python-list mailing list