[SciPy-user] mapping bool array...

fred fredmfp@gmail....
Fri Aug 24 02:04:25 CDT 2007


Hi,

I continue my thread...

My bool array is a mask array: it contains false & true.
The "shape" which contains true inside this mask has the shape of an 
ellipse.

I want to create a float array which has the same dimension
as the mask: inside the ellispoide, I want to put scalars from another array
which has the right dimensions to fit those of the ellipse's,
and outside, I want to put 0.

How can I do this, in a « numpy/scipy way » ?
(read: without loops, if possible; if not, it's straightforward).

TIA.

Cheers,

-- 
http://scipy.org/FredericPetit



More information about the SciPy-user mailing list