home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

1 row where repo = 13221727 and user = 27647769 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

  • issue 1

state 1

  • closed 1

repo 1

  • xarray · 1 ✖
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
280942467 MDU6SXNzdWUyODA5NDI0Njc= 1774 xarray mean generates unstable dask name (hash) estebanag 27647769 closed 0     2 2017-12-11T09:11:31Z 2017-12-11T20:43:35Z 2017-12-11T20:43:35Z NONE      

Code Sample

```python import dask.array as da import xarray as xr import numpy as np

create dask array

x = da.ones((5, 5), chunks=(2, 2))

create xarray array

x2 = xr.DataArray(x, dims=['d1', 'd2'])

print dask name after taking mean

x = x.mean(axis=0) print(x.name)

print dask name after taking mean

x2 = x2.mean(dim='d1') print(x2.data.name)

confirm both functions do the same

print(np.allclose(x.compute(), x2.data.compute())) ```

Problem Description

Running the above sample three times outputs: ``` mean_agg-aggregate-9716da6e38d695dbff18f713d787e614 mean_agg-aggregate-02c33c19e6209edbe409749388d2f9f0 True

mean_agg-aggregate-9716da6e38d695dbff18f713d787e614 mean_agg-aggregate-2f59be8ef8c35336717fdcd7744bd167 True

mean_agg-aggregate-9716da6e38d695dbff18f713d787e614 mean_agg-aggregate-822994428d6b4cdea8e5c134711e5609 True ``` which shows the dask name (hash) generated using the xarray mean is unstable.

Expected Output

For processing large datasets, it's convenient to have a stable hash name in order to save intermediate results or compare them among developers.

Current workaround: unwrap dask array and recreate xarray array.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-58-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.0 pandas: 0.21.0 numpy: 1.13.3 scipy: 0.19.1 netCDF4: None h5netcdf: None Nio: None bottleneck: None cyordereddict: None dask: 0.16.0 matplotlib: 2.1.0 cartopy: None seaborn: None setuptools: 38.2.3 pip: 9.0.1 conda: None pytest: None IPython: 6.2.1 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1774/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 31.937ms · About: xarray-datasette