home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 754789691 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

  • cvoivret 1
  • TomNicholas 1
  • husainridwan 1

author_association 2

  • NONE 2
  • MEMBER 1

issue 1

  • Support for monotonically decreasing indices in interpolate_na · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1492399834 https://github.com/pydata/xarray/issues/4637#issuecomment-1492399834 https://api.github.com/repos/pydata/xarray/issues/4637 IC_kwDOAMm_X85Y9Dba TomNicholas 35968931 2023-03-31T18:10:24Z 2023-03-31T18:10:24Z MEMBER

@alrho007 the code for this method on DataArray is in here

https://github.com/pydata/xarray/blob/850156cf80fe8791d45bcaff2da579cffc0cfc35/xarray/core/dataarray.py#L3303

which calls the implementation defined in xarray.core.missing

https://github.com/pydata/xarray/blob/1c81162755457b3f4dc1f551f0321c75ec9daf6c/xarray/core/missing.py#L308

I would start by trying to understand that code (looking at where things are imported to make it work), and then create a small test case example with a monotonically decreasing index that causes a problem. Then try to work out exactly which step in the code causes the issue, and whether it can be generalized to fix the issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support for monotonically decreasing indices in interpolate_na 754789691
1491793033 https://github.com/pydata/xarray/issues/4637#issuecomment-1491793033 https://api.github.com/repos/pydata/xarray/issues/4637 IC_kwDOAMm_X85Y6vSJ husainridwan 61923007 2023-03-31T11:36:46Z 2023-03-31T11:37:12Z NONE

@TomNicholas @dcherian where would I start from if I want to work on this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support for monotonically decreasing indices in interpolate_na 754789691
789652922 https://github.com/pydata/xarray/issues/4637#issuecomment-789652922 https://api.github.com/repos/pydata/xarray/issues/4637 MDEyOklzc3VlQ29tbWVudDc4OTY1MjkyMg== cvoivret 7123715 2021-03-03T11:39:38Z 2021-03-03T11:39:38Z NONE

A simple trick could be to not use the coordinate while interpolating. An example with the same data but the second dataset has a decreasing index.

```python import numpy as np import xarray as xr

da = xr.DataArray([0, 2, np.nan, 3, 3.25], dims="x", coords={"x": [0, 1, 2, 3, 4]}) da1= xr.DataArray([3.25, 3,np.nan,2,0],dims='x',coords={"x":[4,3,2,1,0]})

da_inter=da.interpolate_na(dim='x', method='cubic') da1_inter=da1.interpolate_na(dim='x',method='cubic',use_coordinate=False) ```

As far as I understand interpolation, the result is the same.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support for monotonically decreasing indices in interpolate_na 754789691

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