home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 327591169 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • shoyer 1
  • aurghs 1

author_association 2

  • COLLABORATOR 1
  • MEMBER 1

issue 1

  • DataArrayResample.interpolate coordinates out of bound. · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
393898567 https://github.com/pydata/xarray/issues/2197#issuecomment-393898567 https://api.github.com/repos/pydata/xarray/issues/2197 MDEyOklzc3VlQ29tbWVudDM5Mzg5ODU2Nw== aurghs 35919497 2018-06-01T14:30:46Z 2018-06-01T14:32:53Z COLLABORATOR

Also with oversampling we have the same problem (2007-02-02 02:00:00 is out of bound):

``` python

import numpy as np import pandas as pd import xarray as xr

time = np.arange('2007-01-01 00:00:00', '2007-02-02 00:00:00', dtype='datetime64[ns]') arr = xr.DataArray( np.arange(time.size), coords=[time,], dims=('time',), name='data' ) resampler = arr.resample(time='3h', base=2, label='right')

resampler DatetimeIndex(['2007-01-01 02:00:00', '2007-01-01 05:00:00', '2007-01-01 08:00:00', '2007-01-01 11:00:00', '2007-01-01 14:00:00', '2007-01-01 17:00:00', '2007-01-01 20:00:00', '2007-01-01 23:00:00', '2007-01-02 02:00:00', '2007-01-02 05:00:00', ... '2007-01-31 23:00:00', '2007-02-01 02:00:00', '2007-02-01 05:00:00', '2007-02-01 08:00:00', '2007-02-01 11:00:00', '2007-02-01 14:00:00', '2007-02-01 17:00:00', '2007-02-01 20:00:00', '2007-02-01 23:00:00', '2007-02-02 02:00:00'], dtype='datetime64[ns]', name='time', length=257, freq='3H') ``` The fix is really very easy, I can try to make pull request.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArrayResample.interpolate coordinates out of bound. 327591169
393759154 https://github.com/pydata/xarray/issues/2197#issuecomment-393759154 https://api.github.com/repos/pydata/xarray/issues/2197 MDEyOklzc3VlQ29tbWVudDM5Mzc1OTE1NA== shoyer 1217238 2018-06-01T05:07:34Z 2018-06-01T05:07:34Z MEMBER

This is a good point -- the current code only really makes sense when interpolating to a higher frequency, e.g., daily -> hourly.

I do think going to higher frequencies is the main use-case for interpolation, but I don't think it needs to raise errors in this case. At the least, it would be OK to fill in the invalid values with NaN.

I think the fix might be as simple as setting bounds_error=False in these two places in xarray/core/resmample.py: https://github.com/pydata/xarray/blob/cf19528d6d2baf988ad34e024cae28361c9fd693/xarray/core/resample.py#L202 https://github.com/pydata/xarray/blob/cf19528d6d2baf988ad34e024cae28361c9fd693/xarray/core/resample.py#L341

Any interest in putting together a pull request?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArrayResample.interpolate coordinates out of bound. 327591169

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