home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "NONE" and issue = 242181620 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • JiaweiZhuang 2
  • SimonHeybrock 1
  • lukelbd 1
  • rogvidarge 1

issue 1

  • Allow DataArray to hold cell boundaries as coordinate variables · 5 ✖

author_association 1

  • NONE · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1370563894 https://github.com/pydata/xarray/issues/1475#issuecomment-1370563894 https://api.github.com/repos/pydata/xarray/issues/1475 IC_kwDOAMm_X85RsSU2 SimonHeybrock 12912489 2023-01-04T07:20:36Z 2023-01-04T07:20:36Z NONE

Recently I experimented with an (incomplete) duck-array prototype, wrapping an array of length N+1 in a duck array of length N (such that you can use it as a coordinate for a DataArray of length/shape N). It mostly worked (even though there may be some issues when you want to use it as an xarray index).

See https://github.com/scipp/scippx/blob/main/src/scippx/bin_edge_array.py (there is a bunch of unrelated stuff in the repo, you can mostly ignore that).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow DataArray to hold cell boundaries as coordinate variables 242181620
1328123153 https://github.com/pydata/xarray/issues/1475#issuecomment-1328123153 https://api.github.com/repos/pydata/xarray/issues/1475 IC_kwDOAMm_X85PKY0R rogvidarge 74651486 2022-11-26T22:18:59Z 2022-11-26T22:18:59Z NONE

Has there been any progress on this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow DataArray to hold cell boundaries as coordinate variables 242181620
1190842459 https://github.com/pydata/xarray/issues/1475#issuecomment-1190842459 https://api.github.com/repos/pydata/xarray/issues/1475 IC_kwDOAMm_X85G-tBb lukelbd 19657652 2022-07-20T22:46:36Z 2022-07-20T22:46:36Z NONE

Not sure where this stands but another advantage might be the ability to call xr.open_dataarray on netcdf files containing individual variables plus coordinate bounds (data from CMIP5/6 are commonly stored this way).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow DataArray to hold cell boundaries as coordinate variables 242181620
314862336 https://github.com/pydata/xarray/issues/1475#issuecomment-314862336 https://api.github.com/repos/pydata/xarray/issues/1475 MDEyOklzc3VlQ29tbWVudDMxNDg2MjMzNg== JiaweiZhuang 25473287 2017-07-12T18:50:02Z 2017-07-13T01:48:32Z NONE

Probably the simplest option is to use structured dtypes, which should already work with the existing version of xarray, e.g.,

Thanks, that's a nice trick! Supporting da.x_bounds['start'] will definitely be helpful!

However, I am still concerned about 2D boundaries. Using the structured data type, 2D bounds will be an array of size (Nx,Ny,4) instead of (Nx+1,Ny+1). Although this matches the CF convention, it takes 4x memory and needs to be converted back to (Nx+1,Ny+1) for pcolormesh(). Not a big problem though. I will be happy to go this way if (Nx+1,Ny+1)-sized bounds cannot be implemented.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow DataArray to hold cell boundaries as coordinate variables 242181620
314604740 https://github.com/pydata/xarray/issues/1475#issuecomment-314604740 https://api.github.com/repos/pydata/xarray/issues/1475 MDEyOklzc3VlQ29tbWVudDMxNDYwNDc0MA== JiaweiZhuang 25473287 2017-07-11T23:58:20Z 2017-07-11T23:58:20Z NONE

See also #1079 and #1079 (comment)

Thanks! The idea of NDIntervalIndex mentioned at pandas-dev/pandas#7640 comment seems powerful but too complicated to implement? Could there be a simpler way to hook the boundary attribute to DataArray?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow DataArray to hold cell boundaries as coordinate variables 242181620

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