home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed", type = "pull" and user = 1005109 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 1

  • pull · 2 ✖

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
1061430200 PR_kwDOAMm_X84u6iop 6019 Use complex nan by default when interpolating out of bounds pums974 1005109 closed 0     0 2021-11-23T15:38:25Z 2021-11-28T04:40:06Z 2021-11-28T04:40:06Z CONTRIBUTOR   0 pydata/xarray/pulls/6019
  • [X] Tests added
  • [X] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

When using the da.interp to interpolate outside of the bounds, by default, fill_value is set to np.nan to set the values to NaN. This is completely fine with real values, but with complex values this will in fact set the values to np.nan + 0j which can be a source of confusion and bugs. This PR propose to detect if values are complex, and if so, to use np.nan + np.nan*1j as the default fill_value

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6019/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
638909879 MDExOlB1bGxSZXF1ZXN0NDM0NTg2NDg5 4155 Implement interp for interpolating between chunks of data (dask) pums974 1005109 closed 0     42 2020-06-15T14:42:32Z 2020-09-06T12:27:15Z 2020-08-11T23:15:49Z CONTRIBUTOR   0 pydata/xarray/pulls/4155

In a project of mine I need to interpolate a dask-based xarray between chunk of data.

When using the current official interp function (xarray v0.15.1), the code:

```python datax = xr.DataArray(data=da.from_array(np.arange(0, 4), chunks=2), coords={"x": np.linspace(0, 1, 4)}, dims="x") datay = xr.DataArray(data=da.from_array(np.arange(0, 4), chunks=2), coords={"y": np.linspace(0, 1, 4)}, dims="y") data = datax * datay

# both of these interp call fails
res = datax.interp(x=np.linspace(0, 1))
print(res.load())

res = data.interp(x=np.linspace(0, 1), y=0.5)
print(res.load())

`` fails withNotImplementedError: Chunking along the dimension to be interpolated (0) is not yet supported.`, but succeed with this version

I also want to alert that my version does not work with "advanced interpolation" (as shown in the xarray documentation) Also, my version cannot be used to make interpolate_na work with chunked data

  • [x] Closes #4078
  • [x] Tests added
  • [x] Passes isort -rc . && black . && mypy . && flake8
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4155/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

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 22.688ms · About: xarray-datasette