Tracker: cupyx.scipy.interpolate
See original GitHub issueDescription
This is an issue to keep track of the current improvement work to the cupyx.scipy.interpolate
module. The order of the checkboxes denote the planned order and priority of implementation of each module. This plan was devised by @ev-br and is subject to change and discussion.
First phase
-
BSpline
→ https://github.com/cupy/cupy/pull/7086 -
RBFInterpolator
→ https://github.com/cupy/cupy/pull/7190 -
make_interp_spline
→ https://github.com/cupy/cupy/pull/7195 -
RegularGridInterpolator
: methodslinear
andnearest
→ https://github.com/cupy/cupy/pull/7197 -
make_interp_spline(..., bc_type="periodic")
→ https://github.com/cupy/cupy/pull/7206 -
CubicHermiteSpline
: Required bypchip/akima/CubicSpline
→ https://github.com/cupy/cupy/pull/7242 -
PchipInterpolator
: aliases (pchip
,pchip_interpolate
) → https://github.com/cupy/cupy/pull/7255 -
Akima1DInterpolator
Second phase (details subject to change)
-
RegularGridInterpolator
: methodscubic
,quintic
,slinear
,pchip
-
Interpn
: alias toRegularGridInterpolator
-
CubicBSpline
-
splantider
,splder
→ https://github.com/cupy/cupy/pull/7086 -
BPoly
-
NdPPoly
QHull-dependent modules
-
make_lsq_spline
-
interp1d
: @ev-br states that it could be ignored (maybe?)
“Odds and ends”
-
BarycentricInterpolator
→ https://github.com/cupy/cupy/pull/6958 -
barycentric_interpolate
→ https://github.com/cupy/cupy/pull/6958 -
KroghInterpolator
→ https://github.com/cupy/cupy/pull/6990 -
krogh_interpolate
→ https://github.com/cupy/cupy/pull/6990 -
approximate_taylor_polynomial
-
lagrange
-
pade
Problematic modules and functions
QHull-dependent
- `CloughTocher2DInterpolator
-
LinearNDInterpolator
-
NearestNDInterpolator
-
griddata
: a wrapper over the above three -
RBFInterpolator(..., neighbors=not None)
: Depends on KD-Tree
FITPACK code (Black-box Fortran code)
-
BivariateSpline
-
LSQBivariateSpline
-
LSQSphereBivariateSpline
-
RectBivariateSpline
-
RectSphereBivariateSpline
-
SmoothBivariateSpline
-
SmoothSphereBivariateSpline
-
UnivariateSpline
-
InterpolatedUnivariateSpline
-
LSQUnivariateSpline
-
bisplev
-
bisplrep
-
insert
-
spalde
-
splev
-
splint
-
splprep
-
splrep
-
sproot
Deprecated APIs
Interp2d
Rbf
New APIs (not available in SciPy main)
-
make_smooth_spline
-
NdBSpline
Please feel free to discuss any changes to this roadmap/exploration.
Additional Information
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:16
- Comments:11 (11 by maintainers)
Top GitHub Comments
I guess I’d need to explain a bit the ordering here. This is indeed opinionated 😃 and is very much up to a discussion.
First phase: once these are all done,
cupyx.interpolate
can be declared MVP: most common usage is possible. The first phase work can be done partly asynchronously:make_interp_spline
is a factory which constructs BSpline instances from data.CubicHermiteSpline
is aPPoly
subclass, which is then the base for pchip, akima and CubicSpline. The hard part is I guess PPoly, as it has cython code / needs C kernels. The rest is pure python.CubicSpline
is listed in the 2nd phase mainly because its functionality is a subset ofmake_interp_spline
. Since the work on BSpline is already quite far, I don’t see a reason to not finish it up. (Did I mention that the list is opinionated?)So the first phase seems to have four lines of work which can be done in parallel: BSpline/make_interp_spline, PPoly and subclasses, RGI, RBF. In principle, once can pospone the BSpline work and concentrate on PPoly instead if there is a strong feel for it.
The second phase:
There is a small typo (which propagates from the original where I made this typo): BPoly, NdPPoly, CubicSpline and interp1d are not Qhull-based.
BPoly is very similar to PPoly but less used (Mainly superseded by CubicHermiteSpline), NdPPoly is underused, so can be left for later. interp1d is legacy.
All these can be pushed to later, after the QHull based stuff is done. And that needs qhull or a cuda analog. Is there a triangulation library for CUDA we can depend on?
The last big question is what to do with FITPACK based smoothing splines. Hopefully this question can be postponed 😃.
You can just pick something and start digging in, CuPy welcomes PRs from everyone and it doesn’t require pre-assigning a topic. However, given that this tracker is currently quite actively being worked on, I would suggest that once you’ve looked into a particular API for a little bit and think it’s a good fit for you, to post here that you’re tackling it - just to avoid double work.