Skip to content

Commit 211984d

Browse files
committed
more formatting + user-guide update
1 parent f3efc06 commit 211984d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

doc/user-guide/interpolation.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ It is now possible to safely compute the difference ``other - interpolated``.
132132
Interpolation methods
133133
---------------------
134134

135-
We use :py:class:`scipy.interpolate.interp1d` for 1-dimensional interpolation.
135+
We use either :py:class:`scipy.interpolate.interp1d` or special interpolants from
136+
:py:class:`scipy.interpolate` for 1-dimensional interpolation (see :py:meth:`~xarray.Dataset.interp`).
136137
For multi-dimensional interpolation, an attempt is first made to decompose the
137138
interpolation in a series of 1-dimensional interpolations, in which case
138-
:py:class:`scipy.interpolate.interp1d` is used. If a decomposition cannot be
139+
the relevant 1-dimensional interpolator is used. If a decomposition cannot be
139140
made (e.g. with advanced interpolation), :py:func:`scipy.interpolate.interpn` is
140141
used.
141142

xarray/core/dataset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3906,7 +3906,7 @@ def interp(
39063906
- Methods {"linear", "nearest", "zero", "slinear", "quadratic", "cubic", "quintic", "polynomial"}
39073907
use :py:class:`scipy.interpolate.interp1d`, unless conditions permit the use of :py:class:`numpy.interp`
39083908
(as in the case of `method='linear'` for 1D data).
3909-
- If `method='polynomial'`, the `order` keyword argument must also be provided. In this case,
3909+
- If `method='polynomial'`, the `order` keyword argument must also be provided. In this case,
39103910
:py:class:`scipy.interpolate.interp1d` is called with `kind=order`.
39113911
39123912
3. **Special interpolants for interpolation along one dimension of N-dimensional data (N ≥ 1)**
@@ -3915,7 +3915,7 @@ def interp(
39153915
- `"barycentric"`: :py:class:`scipy.interpolate.BarycentricInterpolator`
39163916
- `"krogh"`: :py:class:`scipy.interpolate.KroghInterpolator`
39173917
- `"akima"` or `"makima"`: :py:class:`scipy.interpolate.Akima1dInterpolator`
3918-
(`makima` is handled by passing `makima` to `method`).
3918+
(`makima` is handled by passing `makima` to `method`).
39193919
39203920
4. **Interpolation along multiple dimensions of multi-dimensional data**
39213921
- Uses :py:func:`scipy.interpolate.interpn` for methods {"linear", "nearest", "slinear",
@@ -4208,16 +4208,16 @@ def interp_like(
42084208
- Methods {"linear", "nearest", "zero", "slinear", "quadratic", "cubic", "quintic", "polynomial"}
42094209
use :py:class:`scipy.interpolate.interp1d`, unless conditions permit the use of :py:class:`numpy.interp`
42104210
(as in the case of `method='linear'` for 1D data).
4211-
- If `method='polynomial'`, the `order` keyword argument must also be provided. In this case,
4212-
:py:class:`scipy.interpolate.interp1d` is called with `kind=order`.
4211+
- If `method='polynomial'`, the `order` keyword argument must also be provided. In this case,
4212+
:py:class:`scipy.interpolate.interp1d` is called with `kind=order`.
42134213
42144214
3. **Special interpolants for interpolation along one dimension of N-dimensional data (N ≥ 1)**
42154215
- Depending on the `method`, the following interpolants from :py:class:`scipy.interpolate` are used:
42164216
- `"pchip"`: :py:class:`scipy.interpolate.PchipInterpolator`
42174217
- `"barycentric"`: :py:class:`scipy.interpolate.BarycentricInterpolator`
42184218
- `"krogh"`: :py:class:`scipy.interpolate.KroghInterpolator`
42194219
- `"akima"` or `"makima"`: :py:class:`scipy.interpolate.Akima1dInterpolator`
4220-
(`makima` is handled by passing `makima` to `method`).
4220+
(`makima` is handled by passing `makima` to `method`).
42214221
42224222
4. **Interpolation along multiple dimensions of multi-dimensional data**
42234223
- Uses :py:func:`scipy.interpolate.interpn` for methods {"linear", "nearest", "slinear",

0 commit comments

Comments
 (0)