home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 498297720 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

  • equaeghe 1
  • dcherian 1
  • keewis 1
  • TomNicholas 1

author_association 2

  • MEMBER 3
  • NONE 1

issue 1

  • Interpolation using non-dimension coordinates · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
535969947 https://github.com/pydata/xarray/issues/3343#issuecomment-535969947 https://api.github.com/repos/pydata/xarray/issues/3343 MDEyOklzc3VlQ29tbWVudDUzNTk2OTk0Nw== dcherian 2448579 2019-09-27T14:44:17Z 2019-09-27T14:44:17Z MEMBER

More generally, this is about applying operations with non dimensional coordinates which need not be 1D. Thinking about API, how about adding a coord kwarg?

da.differentiate(dim="nx", coord="x")

This says use np.diff on da along dimension nx and divide by spacing calculated by np.diff on da.x along dimension nx

If x is 1D, then da.differentiate(coord="x") is equivalent to da.differentiate(dim="nx", coord="x") which is your proposal. i think this is cleaner and more explicit than automatically mapping 1D nondimensional coords to dimensions.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation using non-dimension coordinates 498297720
535475540 https://github.com/pydata/xarray/issues/3343#issuecomment-535475540 https://api.github.com/repos/pydata/xarray/issues/3343 MDEyOklzc3VlQ29tbWVudDUzNTQ3NTU0MA== TomNicholas 35968931 2019-09-26T12:15:44Z 2019-09-26T12:15:44Z MEMBER

This is an example of a general UI problem which I was actually about to raise an issue about.

There are loads of places in xarray's API which require a dimension, but the operation would make just as much sense if a 1D coordinate were supplied instead (as that uniquely specifies a dimension).

I encountered the same kind of problem in #3334 with da.transpose().

I wonder if it would be possible to have a little helper function process the dim input to these functions and if it's a 1D coord, just demote it to the corresponding dim.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation using non-dimension coordinates 498297720
535169724 https://github.com/pydata/xarray/issues/3343#issuecomment-535169724 https://api.github.com/repos/pydata/xarray/issues/3343 MDEyOklzc3VlQ29tbWVudDUzNTE2OTcyNA== equaeghe 601177 2019-09-25T19:13:46Z 2019-09-25T19:13:46Z NONE

you might be able to achieve what you want by using swap_dims

Yes, that is a nice workaround (I used another, less convenient one). But I would say that the current (lack of) functionality is a bug: the documentation talks about coordinates, not about dimensions. Moreover, it seems like something one would want to support. I do not know how complicated this would be to implement, but if reasonably feasible, I would request to keep this issue open.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation using non-dimension coordinates 498297720
535036214 https://github.com/pydata/xarray/issues/3343#issuecomment-535036214 https://api.github.com/repos/pydata/xarray/issues/3343 MDEyOklzc3VlQ29tbWVudDUzNTAzNjIxNA== keewis 14808389 2019-09-25T13:57:41Z 2019-09-25T13:57:41Z MEMBER

you might be able to achieve what you want by using swap_dims: python da.swap_dims({"dim": "nondim"}).interp(nondim=.5)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation using non-dimension coordinates 498297720

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