home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • dcherian 2
  • yt87 2

author_association 2

  • MEMBER 2
  • NONE 2

issue 1

  • to_zarr() fails on time coordinate in append mode · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
823218179 https://github.com/pydata/xarray/issues/5106#issuecomment-823218179 https://api.github.com/repos/pydata/xarray/issues/5106 MDEyOklzc3VlQ29tbWVudDgyMzIxODE3OQ== dcherian 2448579 2021-04-20T12:04:06Z 2021-04-20T12:04:06Z MEMBER

Thanks @yt87 can you open a new issue to fix that error message?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_zarr() fails on time coordinate in append mode 849751721
822968365 https://github.com/pydata/xarray/issues/5106#issuecomment-822968365 https://api.github.com/repos/pydata/xarray/issues/5106 MDEyOklzc3VlQ29tbWVudDgyMjk2ODM2NQ== yt87 40218891 2021-04-20T04:41:07Z 2021-04-20T04:41:07Z NONE

I am closing this issue. It is impossible to guess the proper time unit when dealing with missing data. Setting the attribute explicitly is a better solution.

A minor quibble: the statement ds1.reftime.encoding['units'] = 'hours since Big Bang' rises an exception AttributeError: 'NoneType' object has no attribute 'groups' It should be ValueError: invalid time units: hours since Big Bang the same as in the case 'hours after 1970-01-01'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_zarr() fails on time coordinate in append mode 849751721
822126043 https://github.com/pydata/xarray/issues/5106#issuecomment-822126043 https://api.github.com/repos/pydata/xarray/issues/5106 MDEyOklzc3VlQ29tbWVudDgyMjEyNjA0Mw== dcherian 2448579 2021-04-19T02:33:21Z 2021-04-19T02:33:21Z MEMBER

There is a related issue for netCDF. The automagic guessing is not working so you'll need to manually set .encoding["units"] to preserve the time resolution you want. See https://xarray.pydata.org/en/stable/io.html#time-units

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_zarr() fails on time coordinate in append mode 849751721
822108756 https://github.com/pydata/xarray/issues/5106#issuecomment-822108756 https://api.github.com/repos/pydata/xarray/issues/5106 MDEyOklzc3VlQ29tbWVudDgyMjEwODc1Ng== yt87 40218891 2021-04-19T01:27:02Z 2021-04-19T01:28:38Z NONE

When the time dimension of the dataset being appended to is 1, the inferred unit is "days". This happens on line 318 in file conding/times.py. In this case variable timedeltas is an empty array and np.all evaluates to True: np.all(np.array([]) % 86400000000000 == 0) True (which surprised me, by the way). When I forced _infer_time_units_from_diff to return "hours", the time coordinate in my example is evaluated correctly, so I think this particular code is the cause for the error.

Since the fallback return value is set to "seconds", I would argue that the case of empty timedeltas should be set to "seconds" as well. Are there alternatives or I should go ahead and create a pull request?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_zarr() fails on time coordinate in append mode 849751721

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