home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "NONE" and issue = 390774883 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

  • lanougue 2

issue 1

  • Pad method · 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
562654929 https://github.com/pydata/xarray/issues/2605#issuecomment-562654929 https://api.github.com/repos/pydata/xarray/issues/2605 MDEyOklzc3VlQ29tbWVudDU2MjY1NDkyOQ== lanougue 32069530 2019-12-06T17:02:05Z 2019-12-06T17:02:05Z NONE

Ho, sorry... I just see the PR...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pad method 390774883
562652648 https://github.com/pydata/xarray/issues/2605#issuecomment-562652648 https://api.github.com/repos/pydata/xarray/issues/2605 MDEyOklzc3VlQ29tbWVudDU2MjY1MjY0OA== lanougue 32069530 2019-12-06T16:56:20Z 2019-12-06T16:56:20Z NONE

Hi, I was looking to some xarray padding function and get this issue. For the moment, I made a function of my own based on numpy.pad and xr.apply_ufunc When possible, it also pad associated coordinates. If it can be of any help here... Here it is: ``` def xpad(ds, dims={}): """ Padding of xarray. Coordinate are linearly padded if original coordinates are evenly spaced. Otherwise, no new coordinates are affected to padded axis. Padded dimension is named with prefix 'padded_'

Args:
    ds (xarray): xarray
    dims (dict): keys are dimensions along which to pad and values are padding tuple (see np.pad). (ex {'pulse:(10,0)})

Returns:
    (xarray) : same as input with padded axis. 
"""
mypad = [(0,0) for n in ds.dims if n not in dims.keys()]
mypad+=list(dims.values())
padded_ds = xr.apply_ufunc(np.pad, ds, mypad,input_core_dims=[list(dims.keys()),[]], output_core_dims=[['padded_'+d for d in dims.keys()]], keep_attrs=True)

for var, ext in dims.items():
    dvar = np.diff(ds[var])
    if np.allclose(dvar, dvar[0]):
        dvar = dvar[0]
        left_bound, right_bound  = (np.min(ds[var]).data, np.max(ds[var]).data) if dvar>0. else (np.max(ds[var]).data, np.min(ds[var]).data)
        extended_var = np.append(ds[var].data, np.max(ds[var]).data+np.arange(1,ext[1]+1)*dvar)
        extended_var = np.append(np.min(ds[var]).data+np.arange(-ext[0],0)*dvar, extended_var)
        padded_ds = padded_ds.assign_coords(**{'padded_'+var:extended_var})
    else:
        print('Coordinates {} are not evenly spaced, padding is impossible'.format(var))
return padded_ds

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pad method 390774883

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