home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed" and user = 40182387 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 2

  • issue 1
  • pull 1

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
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
1249350841 PR_kwDOAMm_X844go67 6639 Fix kwargs used for extrapolation in docs lstngr 40182387 closed 0     10 2022-05-26T09:52:45Z 2022-06-01T06:45:20Z 2022-06-01T06:41:26Z CONTRIBUTOR   0 pydata/xarray/pulls/6639

The current version of xarray tries to call scipy's interp1d whenever possible, and kwargs used in the user guide should reflect this.

Closes #6617

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6639/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1238838588 I_kwDOAMm_X85J1y08 6617 Multi-dimensional extrapolation doesn't work lstngr 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 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, returning the result.
  • [X] New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

Python <xarray.DataArray (space: 10)> 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 xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 807.15ms · About: xarray-datasette