You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Untangle kernel re-normalization & NaN interpolation
The following seems untrue, unnecessary, and inefficient (src)
# Because the Cython routines have to normalize the kernel on the fly, we# explicitly normalize the kernel here, and then scale the image at the# end if normalization was not requested.
Hmmm, maybe not. The interpolation scheme seems to prevent this hoist and is the reason that the kernel summation exists in the Cython code. If the image element is NaN then the kernel element is not incorporated in the sum.
A silver lining is that the above is only true for nan_treatment = 'interpolate'. It can, therefore, be optimized out for all other options. NaN interpolation is, however, the default.
This can also be checked before convolving to determine whether NaN values even exist.
Reactions are currently unavailable
Activity
Repository owner locked and limited conversation to collaborators on Mar 13, 2018
Activity