CoilM
July 7, 2023, 7:24am
1
Hello,
I was taking a look at skimage.transform.warp
and it seems that it use the Cython routine only for order 1-3, due to this conditon:
if order in (0, 3) and not map_args:
However, looking at _warp_fast
in _warps_cy.pyx
it seems like there exists an implementation for order 0:
if order == 0:
interp_func = nearest_neighbor_interpolation[np_floats, np_floats, np_floats]
Is there a reason for this limitation?
lagru
November 24, 2023, 11:21am
2
Hey
It seems that the Cython pathway for order == 0
was removed in Fix warp output dtype when order=0 by rfezzani · Pull Request #5327 · scikit-image/scikit-image · GitHub to preserve the input range and dtype. Maybe to align with other interpolating behavior?
Do you have a use case for which it is it a limitation? I haven’t looked into whether this had negative performance implications? Might be that the fallback map_coordinates
isn’t significantly slower anyway.
lagru
November 24, 2023, 11:23am
3
Oh, and sorry for the long response time.