[SciPy-User] ndimage aware of masked arrays?
Jose Gomez-Dans
jgomezdans at gmail.com
Thu Oct 8 08:42:37 EDT 2009
Hi!
I would like to apply a gaussian filter to a 2d (masked) array, but I would
only like to consider unmasked values (so that whenever it is calculating
the output for a given pixel, only pixels in the neighbourhood with values
unmasked are taken into account in the calculation). However,
ndimage.filters.gaussian_filter seems to be unaware of masked arrays:
>>> type( arr1 )
<class 'numpy.ma.core.MaskedArray'>
>>> gauss_arr1 = filters.gaussian_filter( arr1, (20,20) )
Is there some simple way of doing this?
Thanks!
J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20091008/dfe49aa5/attachment.html>
More information about the SciPy-User
mailing list