home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 177484162 and user = 7933853 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • lvankampenhout · 2 ✖

issue 1

  • How to efficiently use DataArrays with Cartopy's add_cyclic_point utility? · 2 ✖

author_association 1

  • NONE 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
470546895 https://github.com/pydata/xarray/issues/1005#issuecomment-470546895 https://api.github.com/repos/pydata/xarray/issues/1005 MDEyOklzc3VlQ29tbWVudDQ3MDU0Njg5NQ== lvankampenhout 7933853 2019-03-07T14:29:53Z 2019-03-07T14:29:53Z NONE

Stephan, thanks a lot for your code snippet from December, this is an elegant solution to the problem. One minor correction though, because I found that it fails to infer the period if none is given. The divide should be a multiplication I believe, i.e.

```python import xarray import numpy as np

def add_cyclic_point(xarray_obj, dim, period=None): if period is None: period = xarray_obj.sizes[dim] * xarray_obj.coords[dim][:2].diff(dim).item() first_point = xarray_obj.isel({dim: slice(1)}) first_point.coords[dim] = first_point.coords[dim]+period return xarray.concat([xarray_obj, first_point], dim=dim) ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How to efficiently use DataArrays with Cartopy's add_cyclic_point utility? 177484162
447034484 https://github.com/pydata/xarray/issues/1005#issuecomment-447034484 https://api.github.com/repos/pydata/xarray/issues/1005 MDEyOklzc3VlQ29tbWVudDQ0NzAzNDQ4NA== lvankampenhout 7933853 2018-12-13T16:34:13Z 2018-12-13T16:34:29Z NONE

Any update on this issue? It would be great if add_cyclic_point could be applied to all variables automatically.

Just for other peoples reference, I now have this workaround, creating erai_jja_cy a 'cyclic' version of erai_jja: python dd, ll = add_cyclic_point(erai_jja.values, erai_jja.lon) erai_jja_cy = xr.DataArray(dd, coords={'lat':erai_jja.lat, 'lon':ll}, dims=('lat','lon'))

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  How to efficiently use DataArrays with Cartopy's add_cyclic_point utility? 177484162

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