id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1238838588,I_kwDOAMm_X85J1y08,6617,Multi-dimensional extrapolation doesn't work,40182387,closed,0,,,2,2022-05-17T15:45:08Z,2022-06-01T06:41:26Z,2022-06-01T06:41:26Z,CONTRIBUTOR,,,,"### What happened? I am trying to interpolate and _extrapolate_ a two dimensional DataArray. Passing the `kwargs=dict(fill_value=None)` argument to `DataArray.interp` still returns `nan` values. The MCVE is taken from the [documentation guide](https://docs.xarray.dev/en/stable/user-guide/interpolation.html) on interpolation. (Note that the documentation also shows `nan` values.) ### What did you expect to happen? I expected the routine to extrapolate the data when ""out-of-bounds"" coordinates were provided. ### Minimal Complete Verifiable Example ```Python import xarray as xr import numpy as np # multi-dimensional extrapolation da = xr.DataArray( np.sin(0.3 * np.arange(12).reshape(4, 3)), [(""time"", np.arange(4)), (""space"", [0.1, 0.2, 0.3])], ) interped_da = da.interp(time=4, space=np.linspace(-0.1, 0.5, 10), kwargs={""fill_value"": None}) print(interped_da) ``` ### MVCE confirmation - [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [X] Complete example — the example is self-contained, including all data and the text of any traceback. - [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [X] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output ```Python array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan]) Coordinates: time int64 4 * space (space) float64 -0.1 -0.03333 0.03333 0.1 ... 0.3 0.3667 0.4333 0.5 ``` ### Anything else we need to know? This is my first issue, I hope I didn't forget something! Thank you for the amazing package! ### Environment
``` INSTALLED VERSIONS ------------------ commit: None python: 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:22:55) [GCC 10.3.0] python-bits: 64 OS: Linux OS-release: 5.3.18-150300.59.63-default machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.10.6 libnetcdf: None xarray: 2022.3.0 pandas: 1.4.2 numpy: 1.21.5 scipy: 1.7.3 netCDF4: None pydap: None h5netcdf: None h5py: 3.6.0 Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.4 dask: 2022.05.0 distributed: 2022.5.0 matplotlib: 3.5.2 cartopy: None seaborn: None numbagg: None fsspec: 2022.3.0 cupy: None pint: None sparse: None setuptools: 62.2.0 pip: 22.1 conda: None pytest: None IPython: 8.3.0 sphinx: 4.5.0 ```
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6617/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue