home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 694874737

This data as json

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
694874737 MDU6SXNzdWU2OTQ4NzQ3Mzc= 4410 interpolate_na doesn't support extrapolation 30388627 closed 0     4 2020-09-07T08:46:50Z 2020-11-30T17:25:42Z 2020-11-30T17:25:42Z NONE      

What happened: interpolate_na doesn't support extrapolation

What you expected to happen: Support extrapolation.

Minimal Complete Verifiable Example:

```python import xarray as xr import numpy as np

x = xr.DataArray( [[0, 1, np.nan, np.nan, 2, np.nan, np.nan]], dims=['y', 'x'], coords={"x": xr.Variable("x", [0, 1, 1.1, 1.8, 2, 4, 5]), 'y': xr.Variable("y", [0])}, )

x = x.interpolate_na(dim="x", method="linear", use_coordinate="x") print(x) ```

The output is: array([[0. , 1. , 1.1, 1.8, 2. , nan, nan]])

It should be this array after extrapolation: array([[0. , 1. , 1.1, 1.8, 2. , 4, 5]])

Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 | packaged by conda-forge | (default, Jul 24 2020, 01:25:15) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 5.4.0-42-generic 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: 4.7.4 xarray: 0.16.0 pandas: 1.0.5 numpy: 1.19.1 scipy: 1.5.2 netCDF4: 1.5.4 pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: 2.4.0 cftime: 1.2.1 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.5 cfgrib: None iris: None bottleneck: None dask: 2.21.0 distributed: 2.21.0 matplotlib: 3.3.0 cartopy: None seaborn: None numbagg: None pint: None setuptools: 49.2.0.post20200712 pip: 20.1.1 conda: None pytest: None IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4410/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.552ms · About: xarray-datasette