[SciPy-user] mapping bool array...
fred
fredmfp at gmail.com
Fri Aug 24 03:04:25 EDT 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