Interpolate up-sampled data using the original data as knots. Parameters ---------- kind : {"linear", "nearest", "zero", "slinear", \ "quadratic", "cubic", "polynomial"}, default: "linear" The method used to interpolate. The method should be suppo
(self, kind: InterpOptions = "linear", **kwargs)
| 208 | ) |
| 209 | |
| 210 | def interpolate(self, kind: InterpOptions = "linear", **kwargs) -> T_Xarray: |
| 211 | """Interpolate up-sampled data using the original data as knots. |
| 212 | |
| 213 | Parameters |
| 214 | ---------- |
| 215 | kind : {"linear", "nearest", "zero", "slinear", \ |
| 216 | "quadratic", "cubic", "polynomial"}, default: "linear" |
| 217 | The method used to interpolate. The method should be supported by |
| 218 | the scipy interpolator: |
| 219 | |
| 220 | - ``interp1d``: {"linear", "nearest", "zero", "slinear", |
| 221 | "quadratic", "cubic", "polynomial"} |
| 222 | - ``interpn``: {"linear", "nearest"} |
| 223 | |
| 224 | If ``"polynomial"`` is passed, the ``order`` keyword argument must |
| 225 | also be provided. |
| 226 | |
| 227 | Returns |
| 228 | ------- |
| 229 | interpolated : DataArray or Dataset |
| 230 | |
| 231 | See Also |
| 232 | -------- |
| 233 | DataArray.interp |
| 234 | Dataset.interp |
| 235 | scipy.interpolate.interp1d |
| 236 | |
| 237 | """ |
| 238 | return self._interpolate(kind=kind, **kwargs) |
| 239 | |
| 240 | def _interpolate(self, kind="linear", **kwargs) -> T_Xarray: |
| 241 | """Apply scipy.interpolate.interp1d along resampling dimension.""" |