home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 48301141 and user = 1562854 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

  • jklymak · 2 ✖

issue 1

  • Creation of an empty DataArray · 2 ✖

author_association 1

  • CONTRIBUTOR 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
275979038 https://github.com/pydata/xarray/issues/277#issuecomment-275979038 https://api.github.com/repos/pydata/xarray/issues/277 MDEyOklzc3VlQ29tbWVudDI3NTk3OTAzOA== jklymak 1562854 2017-01-30T04:42:12Z 2017-01-30T04:42:12Z CONTRIBUTOR

OK, great! I figured it out. Something like the below works; @rabernat had pointed to a similar solution, but I didn't quite understand what dask.array.map_blocks was doing.

``` import xmitgcm import xarray as xr data = xmitgcm.open_mdsdataset(dirname='./',prefix={'T'},iters=12600,read_grid=True,geometry='cartesian',endian='<', chunks={'Z':1,'time':1})

def interpolateAtDepth(T,x0,y0,x,y): import scipy.interpolate if np.shape(T)[-1]>1: xout=np.zeros((1,1,ny,nx))
fit=scipy.interpolate.RectBivariateSpline(x0,y0,T[0,0,:,:].T) xout = fit(x,y).T else: xout=np.ones((1,1,1,1)) return xout

x, y, nx, ny are determined elsewhere, but set the new grid...

tm = data['T'].data.map_blocks(interpolateAtDepth,data['XC'].values,data['YC'].values,x,y,chunks=(1,1,ny,nx)) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Creation of an empty DataArray 48301141
275776968 https://github.com/pydata/xarray/issues/277#issuecomment-275776968 https://api.github.com/repos/pydata/xarray/issues/277 MDEyOklzc3VlQ29tbWVudDI3NTc3Njk2OA== jklymak 1562854 2017-01-27T21:17:57Z 2017-01-27T21:17:57Z CONTRIBUTOR

Given the dask integration, being able to initialize DataArrays that are chunked would be very helpful. I want to map from an old x-y-z grid to a new one, and theoretically it could be too memory intensive to keep the new grid in memory, so it would be nice to initialize an empty one and then fill it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Creation of an empty DataArray 48301141

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