Repository navigation
revise dtype handling in cupyx.scipy.ndimage.spline_filter - #4314
Conversation
|
For this PR we have decided to change the Eventually we want to have a common interface to address all these cases using a defined How do you think? |
|
I can change the kwarg name and default to However, I am interested in extending this to most other functions in |
set behavior to former allow_float32=True case by default
|
I reverted the change to |
|
Jenkins, test this please |
|
Jenkins CI test (for commit 20d6288, target branch master) succeeded! |
This PR is related to #4247, but deals only with the recently implemented
spline_filterfunctions from #4145.The first commit here removes the
allow_float32keyword-only argument which is not present in scikit-image and has not yet appeared in a released CuPy version.It also changes the defaultupdate: restored default output to float64 for SciPy consistency. internal dtype behaves as if allow_float32=True.output=np.float64tooutput=Nonewhich will autoselect a floating point precision for the output. This allows computations to run in single precision by default on float16, float32 or complex64 inputs. In other words, the functionality previously provided byallow_float32=Truebecomes the default.If this type of single precision dtype handling seems okay, I would like to extend it to other functions in the ndimage module in a follow-up PR.
The second commit here adds tests for complex-valued inputs. These were previously supported, but were untested. Complex support was only recently merged upstream in SciPy and will be present in the upcoming 1.6.0 release, so for now a separate test class is used to allow this to also be tested on older SciPy versions.