home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 301795163 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 3
  • NotSqrt 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 1

issue 1

  • xarray.merge exception : invalid type promotion · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
370013168 https://github.com/pydata/xarray/issues/1952#issuecomment-370013168 https://api.github.com/repos/pydata/xarray/issues/1952 MDEyOklzc3VlQ29tbWVudDM3MDAxMzE2OA== shoyer 1217238 2018-03-02T18:38:28Z 2018-03-02T18:38:36Z MEMBER

I think that warning can be safely ignored in this case, but yes, that should also probably be silenced (see also https://github.com/pydata/xarray/issues/1652).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray.merge exception : invalid type promotion 301795163
370007209 https://github.com/pydata/xarray/issues/1952#issuecomment-370007209 https://api.github.com/repos/pydata/xarray/issues/1952 MDEyOklzc3VlQ29tbWVudDM3MDAwNzIwOQ== NotSqrt 1997005 2018-03-02T18:21:20Z 2018-03-02T18:21:20Z CONTRIBUTOR

Fixing maybe_promote helps, but then on my example, there's a FutureWarning: xarray/core/duck_array_ops.py:152: FutureWarning: In the future, 'NAT == x' and 'x == NAT' will always be False. flag_array = (arr1 == arr2)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray.merge exception : invalid type promotion 301795163
369978849 https://github.com/pydata/xarray/issues/1952#issuecomment-369978849 https://api.github.com/repos/pydata/xarray/issues/1952 MDEyOklzc3VlQ29tbWVudDM2OTk3ODg0OQ== shoyer 1217238 2018-03-02T16:46:34Z 2018-03-02T16:46:34Z MEMBER

It looks like the simple fix is to reorder the check for timedelta64 in promote_dtype to be above the check for integer. Any interest in putting together a PR? :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray.merge exception : invalid type promotion 301795163
369974885 https://github.com/pydata/xarray/issues/1952#issuecomment-369974885 https://api.github.com/repos/pydata/xarray/issues/1952 MDEyOklzc3VlQ29tbWVudDM2OTk3NDg4NQ== shoyer 1217238 2018-03-02T16:34:07Z 2018-03-02T16:34:07Z MEMBER

Thanks for the clear report!

This seems to boil down to an issue with xarray.core.dtypes.promote_dtype: ``` In [4]: from xarray.core import dtypes

In [5]: import numpy as np

In [7]: dtypes.maybe_promote(np.dtype('timedelta64[ns]')) Out[7]: (dtype('float64'), nan)

In [9]: dtypes.maybe_promote(np.dtype('datetime64[ns]')) Out[9]: (dtype('<M8[ns]'), numpy.datetime64('NaT')) ```

The source problem seems to be that numpy consider timedelta64 an integer subclass (?!?): In [12]: issubclass(np.timedelta64, np.integer) Out[12]: True

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray.merge exception : invalid type promotion 301795163

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