A question about numpy

Rob Gaddi rgaddi at technologyhighland.invalid
Tue Apr 14 18:49:31 EDT 2015


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() .

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



More information about the Python-list mailing list