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
Investigate Cython routines for uneccessary persisting python (code that does NOT generate C). c.f.generated Cyhton inspection (E.g. cython file.pyx -a)
convolve() param boundary has default 'fill' whilst doc states default is None. Since the default for fill_value = 0. the two are effectively the same. However, if the user accidentally changes the fill_value this value will be used as boundary=None is NOT the actual default and the internal routine convolve<N>d_boundary_fill() is called and not convolve<N>d _boundary_none(). c.f.Direct conv boundary default - None or fill #10
The doc for convolve() states that an exception will be raised for nan_treatment='interpolate' if the kernel sums to zero and therefore cannot be normalized. This is not actually true, no exception is raised. Note: not yet tested, code inspection only.
Note to self: with all perf changes implemented for boundary=None and with a 10kx10k image (no NaNs present) and 111x111 kernel, the new runtime is ~18min compared to ~25, that's ~40% faster!
All other defaults were used, i.e. nan_treatment='interpolate' and normalize_kernel=True.
With a single NaN present, the runtimes are pretty much the same. Only a small 4.4% speed up, which may be within the noise (only ran once at this point).
The 40% is still true when NaN present but nan_treatment='fill'.
Perf boosts
c.f. generated Cyhton inspection (E.g.
cython file.pyx -a)Other Issues
boundaryhas default'fill'whilst doc states default isNone. Since the default forfill_value = 0.the two are effectively the same. However, if the user accidentally changes thefill_valuethis value will be used asboundary=Noneis NOT the actual default and the internal routineconvolve<N>d_boundary_fill()is called and notconvolve<N>d _boundary_none(). c.f. Direct conv boundary default - None orfill#10convolve()states that an exception will be raised fornan_treatment='interpolate'if the kernel sums to zero and therefore cannot be normalized. This is not actually true, no exception is raised. Note: not yet tested, code inspection only.