# xarray.Dataset.interp_like

#### Dataset.interp_like(other, method='linear', assume_sorted=False, kwargs=None, method_non_numeric='nearest')[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L4133-L4243)

Interpolate this object onto the coordinates of another object.

Performs univariate or multivariate interpolation of a Dataset onto new coordinates,
utilizing either NumPy or SciPy interpolation routines.

Out-of-range values are filled with NaN, unless specified otherwise via kwargs to the numpy/scipy interpolant.

* **Parameters:**
  * **other** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset) or [`DataArray`](xarray.DataArray.html.md#xarray.DataArray)) – Object with an ‘indexes’ attribute giving a mapping from dimension
    names to an 1d array-like, which provides coordinates upon
    which to index the variables in this dataset. Missing values are skipped.
  * **method** (`{"linear", "nearest", "zero", "slinear", "quadratic", "cubic", "quintic", "polynomial", "pchip", "barycentric", "krogh", "akima", "makima"}`) – Interpolation method to use (see descriptions above).
  * **assume_sorted** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default*: [`False`](https://docs.python.org/3/builtins/constants.html#False)) – If False, values of coordinates that are interpolated over can be
    in any order and they are sorted first. If True, interpolated
    coordinates are assumed to be an array of monotonically increasing
    values.
  * **kwargs** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict), *optional*) – Additional keyword arguments passed to the interpolator. Valid
    options and their behavior depend which interpolant is use
  * **method_non_numeric** (`{"nearest", "pad", "ffill", "backfill", "bfill"}`, *optional*) – Method for non-numeric types. Passed on to [`Dataset.reindex()`](xarray.Dataset.reindex.html.md#xarray.Dataset.reindex).
    `"nearest"` is used by default.
* **Returns:**
  **interpolated** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset)) – Another dataset by interpolating this dataset’s data along the
  coordinates of the other object.

### Notes

- scipy is required.
- If the dataset has object-type coordinates, reindex is used for these
  : coordinates instead of the interpolation.
- When interpolating along multiple dimensions with methods linear and nearest,
  : the process attempts to decompose the interpolation into independent interpolations
    along one dimension at a time.
- The specific interpolation method and dimensionality determine which
  : interpolant is used:
    1. **Interpolation along one dimension of 1D data (\`method=’linear’\`)**
       : - Uses [`numpy.interp()`](https://numpy.org/doc/stable/reference/generated/numpy.interp.html#numpy.interp), unless fill_value=’extrapolate’ is provided via kwargs.
    2. **Interpolation along one dimension of N-dimensional data (N ≥ 1)**
       : - Methods {“linear”, “nearest”, “zero”, “slinear”, “quadratic”, “cubic”, “quintic”, “polynomial”}
           : use `scipy.interpolate.interp1d()`, unless conditions permit the use of [`numpy.interp()`](https://numpy.org/doc/stable/reference/generated/numpy.interp.html#numpy.interp)
             (as in the case of method=’linear’ for 1D data).
         - If method=’polynomial’, the order keyword argument must also be provided.
    3. **Special interpolants for interpolation along one dimension of N-dimensional data (N ≥ 1)**
       : - Depending on the method, the following interpolants from `scipy.interpolate` are used:
           : - “pchip”: [`scipy.interpolate.PchipInterpolator`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.PchipInterpolator.html#scipy.interpolate.PchipInterpolator)
             - “barycentric”: [`scipy.interpolate.BarycentricInterpolator`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.BarycentricInterpolator.html#scipy.interpolate.BarycentricInterpolator)
             - “krogh”: [`scipy.interpolate.KroghInterpolator`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.KroghInterpolator.html#scipy.interpolate.KroghInterpolator)
             - “akima” or “makima”: `scipy.interpolate.Akima1dInterpolator`
               : (makima is handled by passing the makima flag).
    4. **Interpolation along multiple dimensions of multi-dimensional data**
       : - Uses [`scipy.interpolate.interpn()`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interpn.html#scipy.interpolate.interpn) for methods {“linear”, “nearest”, “slinear”,
           : “cubic”, “quintic”, “pchip”}.

#### SEE ALSO
[`Dataset.interp()`](xarray.Dataset.interp.html.md#xarray.Dataset.interp), [`Dataset.reindex_like()`](xarray.Dataset.reindex_like.html.md#xarray.Dataset.reindex_like), [`scipy.interpolate`](https://docs.scipy.org/doc/scipy/reference/interpolate.html#module-scipy.interpolate)
