Repository navigation
ndimage: support all interpolation boundary modes - #4400
Conversation
The changes here are consistent with a large number of fixes introduced for SciPy 1.6 Specifically this PR includes order=1 and order=0 fixes from SciPy's gh-12767 and gh-12776
STYLE: f-strings in _spline_prefilter_core.py pep 8 fixes
All ndimage test cases now verified to pass when using SciPy 1.6.0 pre-release code
83da19e to
eb3e8e2
Compare
|
pfnCI, test this please. |
|
Thanks for the PR! I think of merging this with BTW, do you have information about when SciPy 1.6 is released? |
|
Jenkins CI test (for commit 23cdb6b, target branch master) succeeded! |
A release candidate should be out any day now. I would guess early Jan for the final release, but don't have a specific date. The original plan was to release in December, but things have gone a bit slower than anticipated, partly due to having to move a lot of CI off of Travis after their billing policy changes. |
|
Okay, thanks for the information! CuPy v9 is planned to release on next April, so SciPy 1.6 is likely released before that. |
|
Would you mark the functions with |
|
LGTM except for that! |
|
Thanks! Let me fix the arguments of the marks a bit to make them properly output messages. |
|
pfnCI, test this please. |
|
Waiting for CI pass. |
|
Jenkins CI test (for commit 94df47b, target branch master) succeeded! |
Overview
This PR adds support for additional boundary modes in all interpolation functions. It is based on the most recent bug fixes and enhancements in this area for SciPy 1.6.0 (~12 issues in SciPy were closed: see meta-issue scipy/scipy#12773).
The changes in this PR correspond to those from scipy/scipy#12767 and scipy/scipy#12776 and include:
The easiest way to understand the various modes is probably via the new figures introduced to SciPy's ndimage tutorial. The main doc site doesn't show these yet, but here is documentation artifact link from one of the CI runs:
https://22174-1460385-gh.circle-artifacts.com/0/html-scipyorg/tutorial/ndimage.html#interpolation-boundary-handling
There is also a text-based explanation in the SciPy
modedocstrings for each individual function. I have not reproduced that here, but can if desired. CuPy users should also be to reach those via our cross-linking to SciPy in theseealsosections of our docstrings.https://22174-1460385-gh.circle-artifacts.com/0/html-scipyorg/generated/scipy.ndimage.affine_transform.html#scipy-ndimage-affine-transform
image from the tutorial reproduced here (Ignore order > 1 for now. Orders 2-5 will be added in a follow-up PR):

Additional Details
Many of the new tests require SciPy >=1.6.0 which should have a release candidate any day now. I have tested locally vs. SciPy master.
The kernel generation code would be somewhat simplified if we dropped support for the legacy
'wrap'mode and only support the newer'grid-wrap'mode which is probably what most users would want (see figure above).