home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 1355733363 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • slevang 1

issue 1

  • Extracting annual amplitude and phase of xarray dataset for each pixel using xarray.DataArray.curvefit · 1 ✖

author_association 1

  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1234368670 https://github.com/pydata/xarray/issues/6968#issuecomment-1234368670 https://api.github.com/repos/pydata/xarray/issues/6968 IC_kwDOAMm_X85Jkvie slevang 39069044 2022-09-01T14:34:05Z 2022-09-01T14:34:05Z CONTRIBUTOR

I don't think curvefit works well with datetime coordinates at this point, because everything gets coerced to float by apply_ufunc. Probably room for improvement there. At a minimum you would need to specify good guesses (p0) and/or bounds in terms of datetime64[ns] values.

An easy enough workaround is to assign a separate non-datetime coordinate. This works: ```python ds = xr.tutorial.open_dataset('air_temperature') ds = ds.assign_coords({'day':(ds.time - ds.time[0]) / np.timedelta64(1, 'D')}).swap_dims({'time':'day'})

def periodic_season(x, a0, a1, a2, a3): # periodic function with both phase amplitude and shift parameters return a0 + a1 * np.cos(a2 * x - a3)

dn = ds.curvefit( 'day', func=periodic_season, p0={'a0':275, 'a1':15, 'a2':2*np.pi/365} ) ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Extracting annual amplitude and phase of xarray dataset for each pixel using xarray.DataArray.curvefit 1355733363

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