[SciPy-user] mapping bool array...

fred fredmfp@gmail....
Fri Aug 24 04:03:09 CDT 2007


Gael Varoquaux a écrit :
> Something like (not tested):
>
> a[b == 0] = c[b == 0]
>
> Get the idea ?
>   
Quite ;-)

This does the trick:

c[a==True] = b.ravel()

Thanks for the idea !

Cheers,

-- 
http://scipy.org/FredericPetit



More information about the SciPy-user mailing list