home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "CONTRIBUTOR" and user = 1941408 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 5

  • Add curvilinear grid support to to_cdms2 and fix mask bug 2
  • interpolate_na: Add max_gap support. 2
  • apply_ufunc(dask='parallelized') with multiple outputs 1
  • Test failures on master with DataArray.to_cdms2 1
  • Use divergent colormap if lowest and highest level span 0 1

user 1

  • stefraynaud · 7 ✖

author_association 1

  • CONTRIBUTOR · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
610472155 https://github.com/pydata/xarray/pull/3913#issuecomment-610472155 https://api.github.com/repos/pydata/xarray/issues/3913 MDEyOklzc3VlQ29tbWVudDYxMDQ3MjE1NQ== stefraynaud 1941408 2020-04-07T15:59:11Z 2020-04-07T15:59:11Z CONTRIBUTOR

Two words.

It may be more appropriate to not only check that vmin and vmax are of opposite signe, but also one of them is not to close from zero, like [-0.01, 100].

This may also be extended to used positive and negative colomaps when vmin and vmax are of the same sign and one of them is close to zeros.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use divergent colormap if lowest and highest level span 0 589833027
538993551 https://github.com/pydata/xarray/issues/1815#issuecomment-538993551 https://api.github.com/repos/pydata/xarray/issues/1815 MDEyOklzc3VlQ29tbWVudDUzODk5MzU1MQ== stefraynaud 1941408 2019-10-07T12:48:01Z 2019-10-07T12:48:01Z CONTRIBUTOR

@andersy005 here is a very little demo of linear regression using lstsq (not linregress) in which only slope and intercept are kept. It is here applied to an array of sea surface temperature. I hope it can help.

python ds = xr.open_dataset('sst_2D.nc', chunks={'X': 30, 'Y': 30}) def ulinregress(x, y): # the universal function ny, nx, nt = y.shape ; y = np.moveaxis(y, -1, 0).reshape((nt, -1)) # nt, ny*nx return np.linalg.lstsq(np.vstack([x, np.ones(nt)]).T, y)[0].T.reshape(ny, nx, 2) time = (ds['time'] - np.datetime64("1950-01-01")) / np.timedelta64(1, 'D') ab = xr.apply_ufunc(ulinregress, time, ds['sst'], dask='parallelized', input_core_dims=[['time'], ['time']], output_dtypes=['d'], output_sizes={'coef': 2, }, output_core_dims=[['coef']]) series = ds['sst'][:, 0, 0].load() line = series.copy() ; line[:] = ab[0, 0, 0] * time + ab[0, 0, 1] series.plot(label='Original') ; line.plot(label='Linear regression') ; plt.legend();

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  apply_ufunc(dask='parallelized') with multiple outputs 287223508
531674432 https://github.com/pydata/xarray/pull/3302#issuecomment-531674432 https://api.github.com/repos/pydata/xarray/issues/3302 MDEyOklzc3VlQ29tbWVudDUzMTY3NDQzMg== stefraynaud 1941408 2019-09-16T07:50:26Z 2019-09-16T07:50:26Z CONTRIBUTOR

Thanks @stefraynaud . I'm having trouble figuring out defining the length of a gap in the irregular coordinate case.

e.g.

da4 = xr.DataArray([np.nan, np.nan, np.nan, 1, np.nan, np.nan, 4, np.nan, np.nan], dims=["y"], coords={"y": [0, 2, 5, 6, 7, 8, 10, 12, 14]})

<xarray.DataArray (y: 9)> array([nan, nan, nan, 1., nan, nan, 4., nan, nan]) Coordinates: * y (y) int64 0 2 5 6 7 8 10 12 14

What is the length of these three gaps given that xarray doesn't have any understanding of grids?

@dcherian In your example, as said @max-sixty, the middle gap has a length of 10-6=4. The length gaps at the edges cannot be computed but it doesn't matter, and the algo should work as when simply counting the nans.

I'll have a look the code, maybe for a new PR after this one.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interpolate_na: Add max_gap support. 492866552
531248632 https://github.com/pydata/xarray/pull/3302#issuecomment-531248632 https://api.github.com/repos/pydata/xarray/issues/3302 MDEyOklzc3VlQ29tbWVudDUzMTI0ODYzMg== stefraynaud 1941408 2019-09-13T14:00:30Z 2019-09-13T14:00:30Z CONTRIBUTOR

Nice feature. How about adding the support max gaps expressed in physical units, since coordinates may be irregular?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  interpolate_na: Add max_gap support. 492866552
409875858 https://github.com/pydata/xarray/issues/2332#issuecomment-409875858 https://api.github.com/repos/pydata/xarray/issues/2332 MDEyOklzc3VlQ29tbWVudDQwOTg3NTg1OA== stefraynaud 1941408 2018-08-02T10:05:12Z 2018-08-02T10:05:12Z CONTRIBUTOR

A call to .getValue() before the comparison of the content should do the trick for both axes (coordinates) and variables. Howerver for variables and 2D axes, the comparison will fail if the fill_value is different since .getValue() is basically a call to .filled(). In this case, a call to .asma() is more appropriate if the assertion function handles masked values.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Test failures on master with DataArray.to_cdms2 346313546
402395346 https://github.com/pydata/xarray/pull/2262#issuecomment-402395346 https://api.github.com/repos/pydata/xarray/issues/2262 MDEyOklzc3VlQ29tbWVudDQwMjM5NTM0Ng== stefraynaud 1941408 2018-07-04T07:53:01Z 2018-07-04T07:53:01Z CONTRIBUTOR

Thanks @fmaussion

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add curvilinear grid support to to_cdms2 and fix mask bug 337563023
402391046 https://github.com/pydata/xarray/pull/2262#issuecomment-402391046 https://api.github.com/repos/pydata/xarray/issues/2262 MDEyOklzc3VlQ29tbWVudDQwMjM5MTA0Ng== stefraynaud 1941408 2018-07-04T07:35:50Z 2018-07-04T07:35:50Z CONTRIBUTOR

Is it up to me to resolve the whats-new.rst conflict?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add curvilinear grid support to to_cdms2 and fix mask bug 337563023

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