home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 470712573 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 4
  • max-sixty 2
  • HasanAhmadQ7 2
  • pep8speaks 1

author_association 3

  • MEMBER 6
  • CONTRIBUTOR 2
  • NONE 1

issue 1

  • BUG fix +test .sel method gives error with float32 values · 9 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
520183947 https://github.com/pydata/xarray/pull/3153#issuecomment-520183947 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUyMDE4Mzk0Nw== max-sixty 5635139 2019-08-10T22:26:45Z 2019-08-10T22:26:45Z MEMBER

Thanks @HasanAhmadQ7 !

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
520183833 https://github.com/pydata/xarray/pull/3153#issuecomment-520183833 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUyMDE4MzgzMw== shoyer 1217238 2019-08-10T22:24:31Z 2019-08-10T22:24:31Z MEMBER

thanks @HasanAhmadQ7 !

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
520182982 https://github.com/pydata/xarray/pull/3153#issuecomment-520182982 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUyMDE4Mjk4Mg== shoyer 1217238 2019-08-10T22:06:46Z 2019-08-10T22:06:46Z MEMBER

I'm going to merge this shortly assuming tests pass...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
513497593 https://github.com/pydata/xarray/pull/3153#issuecomment-513497593 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxMzQ5NzU5Mw== pep8speaks 24736507 2019-07-20T20:39:54Z 2019-08-10T22:01:06Z NONE

Hello @HasanAhmadQ7! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2019-08-10 22:01:05 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
518045169 https://github.com/pydata/xarray/pull/3153#issuecomment-518045169 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxODA0NTE2OQ== shoyer 1217238 2019-08-04T23:33:45Z 2019-08-04T23:33:45Z MEMBER

A fix in pandas that I can imagine is to modify the pd.Index to retain the dtype similar to the PandasIndexAdapter in xarray/core/indexing. However, it seems to me that their design it to coerce any float to float64, so I did not feel they would consider this to be a bug. I would try to dig into such solution more if you recommend so.

Yes, after thinking a little bit more about this I think you're totally right.

Pandas only has Float64Index. When xarray makes an index for float32 data, we use a Float64Index under the hood for look-ups, but the fact that index represents float32 data is only known to xarray, not pandas.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
517995453 https://github.com/pydata/xarray/pull/3153#issuecomment-517995453 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxNzk5NTQ1Mw== HasanAhmadQ7 32473508 2019-08-04T11:29:44Z 2019-08-04T11:30:48Z CONTRIBUTOR

@shoyer A fix in pandas that I can imagine is to modify the pd.Index to retain the dtype similar to the PandasIndexAdapter in xarray/core/indexing. However, it seems to me that their design it to coerce any float to float64, so I did not feel they would consider this to be a bug. I would try to dig into such solution more if you recommend so.

I added a test case in which the coords are float16 (in addiction to the scalar case)to show that casting to the coords type is required.

The lowest level in which I can access the coords type is in the indexing/remap_label_indexers where I could get the coords from the data_obj. In the latest code, casting is done just before calling convert_label_indexer

Sorry if I am missing the point, and thank you in advance for any further feedback.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
515919693 https://github.com/pydata/xarray/pull/3153#issuecomment-515919693 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxNTkxOTY5Mw== HasanAhmadQ7 32473508 2019-07-29T09:33:25Z 2019-07-29T09:34:07Z CONTRIBUTOR

@shoyer @max-sixty I really appreciate your time and feedback. I will work on it within a week.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
515845749 https://github.com/pydata/xarray/pull/3153#issuecomment-515845749 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxNTg0NTc0OQ== shoyer 1217238 2019-07-29T05:04:24Z 2019-07-29T05:04:24Z MEMBER

@HasanAhmadQ7 thanks for looking into this!

I think this could be solved a little more cleanly at a lower level of xarray's indexing logic. In particular, all of our indexing calls go through convert_label_indexer, which in turn uses get_loc and get_indexer_nd helper functions to wrap the calls into pandas.Index methods: https://github.com/pydata/xarray/blob/1d7bcbdc75b6d556c04e2c7d7a042e4379e15303/xarray/core/indexing.py#L106-L118

These helper function would be a good place to implement this casting logic -- and you might even consider trying to fix it upstream in pandas as well.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573
515630862 https://github.com/pydata/xarray/pull/3153#issuecomment-515630862 https://api.github.com/repos/pydata/xarray/issues/3153 MDEyOklzc3VlQ29tbWVudDUxNTYzMDg2Mg== max-sixty 5635139 2019-07-26T23:48:51Z 2019-07-26T23:48:51Z MEMBER

Hi @HasanAhmadQ7 thanks for the PR - I saw your comment here: https://github.com/pydata/xarray/issues/3137#issuecomment-515626172

I see the tests are failing, but the build fails before it tests these changes - could you try merging master and pushing? That'll give them another chance to run.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  BUG fix +test .sel method gives error with float32 values 470712573

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