logo       

Re: masked arrays and nd_image: msg#00022

python.numeric.general

Subject: Re: masked arrays and nd_image

On Wed, 2004-08-11 at 08:53, Curzio Basso wrote:
> Hi all.
>
> I just tried to use a masked array with nd_image, namely to pass it to
> the convolve1d() function, and I got:
>
> error: getShape: couldn't get sequence length.
>
> Does someone know if it possible at all to use nd_image on masked
> arrays?

I don't believe it is possible to use masked arrays directly because
they are not NumArrays or NumArray subclasses. Masked arrays only
contain NumArrays which store the data and mask.

> Or if there is a possibility to do operations on masked images
> without using the ma module?

I think the key here may be the "filled()" method which lets you convert
a masked array into a NumArray with the masked values filled into some
fill value, say 0. I'm not sure what the post convolution mask value
should be.

Regards,
Todd



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise