home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 558519267 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • dcherian 1
  • oarcher 1
  • raphaeldussin 1

author_association 3

  • CONTRIBUTOR 1
  • MEMBER 1
  • NONE 1

issue 1

  • DataArrayCoarsen does not have a map or reduce function · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
738070264 https://github.com/pydata/xarray/issues/3741#issuecomment-738070264 https://api.github.com/repos/pydata/xarray/issues/3741 MDEyOklzc3VlQ29tbWVudDczODA3MDI2NA== oarcher 4264660 2020-12-03T15:15:37Z 2020-12-03T15:15:37Z NONE

As a workaround, it's possible to use rolling and .sel to keep only adjacent windows:

```python ds <xarray.Dataset> Dimensions: (x: 237, y: 69, z: 2) Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 8 ... 228 229 230 231 232 233 234 235 236 * y (y) int64 0 1 2 3 4 5 6 7 8 9 10 ... 59 60 61 62 63 64 65 66 67 68 * z (z) int64 0 1 Data variables: data2D (x, y) float64 dask.array<chunksize=(102, 42), meta=np.ndarray> data3D (x, y, z) float64 dask.array<chunksize=(102, 42, 2), meta=np.ndarray>

window size

window = {'x' : 51, 'y' : 21}

window dims, prefixed by 'k_'

window_dims = {k: "k_%s" % k for k in window.keys()}

dataset, with new dims as window. .sel drop sliding windows, to keep only adjacent ones.

ds_win = ds.rolling(window,center=True).construct(window_dims).sel( {k: slice(window[k]//2,None,window[k]) for k in window.keys()})

<xarray.Dataset> Dimensions: (k_x: 51, k_y: 21, x: 5, y: 3, z: 2) Coordinates: * x (x) int64 25 76 127 178 229 * y (y) int64 10 31 52 * z (z) int64 0 1 Dimensions without coordinates: k_x, k_y Data variables: data2D (x, y, k_x, k_y) float64 dask.array<chunksize=(2, 2, 51, 21), meta=np.ndarray> data3D (x, y, z, k_x, k_y) float64 dask.array<chunksize=(2, 2, 2, 51, 21), meta=np.ndarray>

now, use reduce on a standard dataset, using window k_dims as dimensions

ds_red = ds_win.reduce(np.mean,dim=window_dims.values())

<xarray.Dataset> Dimensions: (x: 5, y: 3, z: 2) Coordinates: * x (x) int64 25 76 127 178 229 * y (y) int64 10 31 52 * z (z) int64 0 1 Data variables: data2D (x, y) float64 dask.array<chunksize=(2, 2), meta=np.ndarray> data3D (x, y, z) float64 dask.array<chunksize=(2, 2, 2), meta=np.ndarray> ```

Note that i was unable to use unique, because the size of the result depend on the data.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArrayCoarsen does not have a map or reduce function 558519267
657803276 https://github.com/pydata/xarray/issues/3741#issuecomment-657803276 https://api.github.com/repos/pydata/xarray/issues/3741 MDEyOklzc3VlQ29tbWVudDY1NzgwMzI3Ng== dcherian 2448579 2020-07-13T21:29:58Z 2020-07-13T21:29:58Z MEMBER

coarsen is pretty similar to rolling AFAIR so it may not be too hard to implement a .reduce method.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArrayCoarsen does not have a map or reduce function 558519267
657793175 https://github.com/pydata/xarray/issues/3741#issuecomment-657793175 https://api.github.com/repos/pydata/xarray/issues/3741 MDEyOklzc3VlQ29tbWVudDY1Nzc5MzE3NQ== raphaeldussin 14662821 2020-07-13T21:04:57Z 2020-07-13T21:04:57Z CONTRIBUTOR

👍 that would be super useful!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArrayCoarsen does not have a map or reduce function 558519267

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 16.556ms · About: xarray-datasette