home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER" and issue = 709272776 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 2
  • dcherian 1
  • fujiisoup 1

issue 1

  • Interpolation with multiple mutlidimensional arrays sharing dims fails · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
700226830 https://github.com/pydata/xarray/issues/4463#issuecomment-700226830 https://api.github.com/repos/pydata/xarray/issues/4463 MDEyOklzc3VlQ29tbWVudDcwMDIyNjgzMA== shoyer 1217238 2020-09-28T19:10:55Z 2020-09-28T19:10:55Z MEMBER

I'll note that:

python da.sel(y=dy, x=dx, method='nearest')

does work, without the need to explicitly pass the shared dimension t. This is why I expected that interp would work the same.

I think interp should work in this case, too!

Let's keep this issue open to track that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation with multiple mutlidimensional arrays sharing dims fails 709272776
700080801 https://github.com/pydata/xarray/issues/4463#issuecomment-700080801 https://api.github.com/repos/pydata/xarray/issues/4463 MDEyOklzc3VlQ29tbWVudDcwMDA4MDgwMQ== dcherian 2448579 2020-09-28T15:26:00Z 2020-09-28T15:26:00Z MEMBER

The error message is indeed unclear.

reopening so that we can fix this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation with multiple mutlidimensional arrays sharing dims fails 709272776
699435286 https://github.com/pydata/xarray/issues/4463#issuecomment-699435286 https://api.github.com/repos/pydata/xarray/issues/4463 MDEyOklzc3VlQ29tbWVudDY5OTQzNTI4Ng== shoyer 1217238 2020-09-26T06:05:22Z 2020-09-26T06:05:22Z MEMBER

I think this gives the correct result? ```

da.interp(t=da['t'], y=dy, x=dx, method='linear') <xarray.DataArray (t: 2, u: 2)> array([[2., 3.], [2., 3.]]) Coordinates: * t (t) int64 10 12 y (u) float64 1.5 2.5 x (t, u) float64 1.5 1.5 1.5 1.5 * u (u) int64 45 55 ```

My general thought is that if an axis (like t in this case) is omitted, then should be equivalent to indexing with the existing coordinate. That is how normal indexing in xarray worked, so interpolation should work the same.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation with multiple mutlidimensional arrays sharing dims fails 709272776
699169927 https://github.com/pydata/xarray/issues/4463#issuecomment-699169927 https://api.github.com/repos/pydata/xarray/issues/4463 MDEyOklzc3VlQ29tbWVudDY5OTE2OTkyNw== fujiisoup 6815844 2020-09-25T21:42:40Z 2020-09-25T21:42:40Z MEMBER

Hi @aulemahal

I think you want to interpolate along tas well as x, and y. If so, you can do

python In [8]: da.interp(t=dx['t'], y=dy, x=dx, method='linear') Out[8]: <xarray.DataArray (t: 2, u: 2)> array([[2., 3.], [2., 3.]]) Coordinates: * t (t) int64 10 12 y (u) float64 1.5 2.5 x (t, u) float64 1.5 1.5 1.5 1.5 * u (u) int64 45 55

If not, this fails as dx['t'] and da['t'] do not match each other. The error message can be improved. A contribution is welcome ;)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Interpolation with multiple mutlidimensional arrays sharing dims fails 709272776

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