uniform_filter not working with NANs present?
Michael Aye
kmichael.aye at gmail.com
Mon Sep 2 16:12:05 EDT 2013
Hi!
I am trying to use ndimage's uniform_filter (for a simple local mean
filtering) on a map-projected image that has NAN's at the border (basically
the corners where the rotated map projected image does not fit into the
rectangular grid).
Is there a way, maybe in skimage, to use a uniform_filter on an array that
contains NANs? ndimage' version does not cope with it correctly:
> arr = array([np.nan, 1,2,3,4,5,np.nan])
> arr
array([ nan, 1., 2., 3., 4., 5., nan])
> nd.filters.uniform_filter(arr, 3)
array([ nan, nan, nan, nan, nan, nan, nan])
Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130902/0906a925/attachment.html>
More information about the scikit-image
mailing list