Update vendored ndimage code with axes support #813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I contributed user-specified
axes
support to the scipy.ndimage API (for filtering and morphology functions). SciPy 0.15 is the first public release with these changes.I originally developed this GPU port of the code in a local cuCIM branch, but submitted it upstream to CuPy and got it merged there before opening this MR. See cupy/cupy#8858 (will first appear in CuPy 14.0).
The test cases here were created before I created the CuPy MR and were later updated/integrated into CuPy's existing style in the MR there. I think we may as well keep the extra tests here as a sanity check that the vendored code continues to work as expected.
Additional testing
A few miscellaneous other updates were copied over from CuPy so that the full
cupyx.scipy.ndimage
test suite patches with the vendored ndimage from cuCIM when applying the following patch to CuPy's test suite (monkey-patches the module to use the one from cuCIM)