[SciPy-user] mapping bool array...

fred fredmfp at gmail.com
Fri Aug 24 05:03:09 EDT 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