There is no single SciPy interpolation function for every dataset. Start with how the samples are arranged: use a one-dimensional interpolator for paired 1-D samples, RegularGridInterpolator or interpn for a rectilinear grid, and griddata or RBFInterpolator for scattered points. Then choose based on smoothness, shape preservation, boundary behavior, and the size and scale of your data.
Which SciPy interpolation API fits your data?
| Data layout | Start with | Best fit | Important qualification |
|---|---|---|---|
| One-dimensional samples | CubicSpline, PchipInterpolator, or make_interp_spline |
Choose according to smoothness and shape requirements. | Check the selected interpolator’s boundary and extrapolation behavior. |
| Multidimensional samples on a rectilinear grid | RegularGridInterpolator or interpn |
Grid axes may have unequal spacing and different numbers of points. | interpn is a convenience wrapper for RegularGridInterpolator. |
| Scattered, unstructured multidimensional samples | griddata or RBFInterpolator |
Use griddata for nearest, linear, or supported cubic interpolation; consider RBF methods when their behavior and cost suit the problem. |
Coordinate scaling, extrapolation, and computational cost need attention. |
The geometry is the key distinction: a full grid is not scattered data. SciPy recommends RegularGridInterpolator or interpn for regular-grid inputs rather than griddata. SciPy’s regular-grid interpolation tutorial explains this distinction.
As an Amazon Associate I earn from qualifying purchases.
How do I interpolate one-dimensional data?
For samples along one axis, select an interpolator for the curve behavior you need instead of defaulting to a general legacy function.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Use CubicSpline for a smooth piecewise cubic curve
CubicSpline constructs piecewise cubic polynomials with continuous first and second derivatives. That smoothness can be useful when a smooth curve is important, but it does not by itself guarantee that the curve stays within the range or shape of the samples.
#1 Best Overall
Use PchipInterpolator when monotonic shape matters
PchipInterpolator is the shape-preserving, monotone option in SciPy’s tutorial, described as non-overshooting. It can be preferable when preserving monotone trends matters more than maximizing smoothness.
Consider make_interp_spline for spline construction
make_interp_spline is another tutorial-listed choice for one-dimensional interpolation. Match the spline construction to the smoothness and shape constraints of the application rather than treating the options as interchangeable.
Rank #2
What about interp1d?
The current SciPy API reference labels interp1d legacy and says it “will no longer receive updates.” It may remain relevant when maintaining existing code, but new code should use a specific modern interpolator selected for its requirements. See the SciPy interp1d API reference.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →How do I interpolate a multidimensional regular grid?
Use RegularGridInterpolator when values are sampled on a rectilinear grid: each dimension has its own coordinate axis, and the axes need not have the same spacing or number of points. Its available methods include nearest, linear, and odd-degree tensor-product spline strategies. The API reference documents its arguments and methods.
interpn provides a convenience function for this regular-grid case. If your data are already organized as a full grid, using a scattered-data routine just because it accepts multiple dimensions is the wrong abstraction; consult the interpn API reference.
How do I interpolate scattered points?
For unstructured points in multiple dimensions, griddata offers nearest, linear, and cubic choices. Its linear method triangulates the input into simplices; its cubic option applies in two dimensions. It is a convenience interface for scattered samples, not the recommended method for a complete regular grid. See SciPy’s griddata API reference.
Account for coordinate scale
If coordinate dimensions use different units or have very different magnitudes, scattered interpolation may produce numerical artifacts. Rescale the coordinates where appropriate; griddata(rescale=True) is an available option. Rescaling changes the coordinate-space geometry, so use it deliberately and ensure it makes sense for the variables in your problem. The unstructured interpolation tutorial discusses this concern.
Recommended Free Tools
Consider RBF interpolation for scattered data or smoothing
RBFInterpolator is another option for scattered data and can be used for smoothing. Its coefficient solve has memory use that grows quadratically with the number of data points; SciPy’s documentation warns it may become impractical for more than about a thousand points. That is a documentation caveat, not a universal cutoff or a performance guarantee. The neighbors option computes each evaluation using nearby data points and can help with larger datasets. SciPy also cautions against relying on RBF extrapolation outside the observed range. Details are in the RBFInterpolator API reference.
Best Value
How should I choose interpolation behavior?
- Need smooth derivatives: consider a spline such as
CubicSpline, while verifying the required continuity and boundary conditions. - Need a monotone, shape-preserving 1-D result: consider
PchipInterpolator. - Need values on a full multidimensional grid: use
RegularGridInterpolatororinterpn. - Have scattered points: choose among
griddatamethods orRBFInterpolatorbased on desired behavior, scaling, and data volume. - Need values beyond the sampled domain: check the chosen method’s documented out-of-bounds settings and test whether extrapolation is physically or analytically meaningful. Interpolation inside the sampled domain does not make extrapolation safe.
Boundary behavior is method-specific. SciPy’s one-dimensional tutorial discusses out-of-bounds behavior and spline extrapolation parameters; read the documentation for the particular interpolator rather than assuming every method handles boundaries the same way. See the SciPy extrapolation examples.
What should I use instead of interp2d?
The current SciPy reference marks interp2d as deprecated/removed. The replacement depends on the data geometry: use RegularGridInterpolator or interpn for regular grids, and a scattered-data method such as griddata or RBFInterpolator for unstructured points. Verify the guidance against the SciPy version used by your project. The status is described in the SciPy interp2d API reference.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




