home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 709503596 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 2
  • dcherian 1
  • ghislainp 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 1

issue 1

  • combine_by_coords could use allclose instead of equal to compare coordinates · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
699550315 https://github.com/pydata/xarray/issues/4465#issuecomment-699550315 https://api.github.com/repos/pydata/xarray/issues/4465 MDEyOklzc3VlQ29tbWVudDY5OTU1MDMxNQ== shoyer 1217238 2020-09-26T21:30:35Z 2020-09-26T21:30:35Z MEMBER

I would suggest only specifying tolerance as an absolute tolerance, which would match the argument name we have on the .sel() method.

Is there a case where you think rtol would be much better, or would let you do something that isn't possible with an absolute tolerance?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  combine_by_coords could use allclose instead of equal to compare coordinates 709503596
699548837 https://github.com/pydata/xarray/issues/4465#issuecomment-699548837 https://api.github.com/repos/pydata/xarray/issues/4465 MDEyOklzc3VlQ29tbWVudDY5OTU0ODgzNw== ghislainp 10563614 2020-09-26T21:15:44Z 2020-09-26T21:15:44Z CONTRIBUTOR

Interesting discussion #2217. As far as I understand, it solves a wider problem than using a tolerance on and a member by member comparison... but more complex to implement.

Here is the simple solution that works for me (combine.py:70):

        if not (all(index.equals(indexes[0]) for index in indexes[1:])
                or (tolerance > 0 and \
                    all(index.is_numeric() for index in indexes) and \
                    all(np.allclose(index, indexes[0], atol=tolerance, rtol=0) for index in indexes[1:]))):

I've not tested in depth, I can make a PR, tests, doc if you agree with this solution.

Regarding the name of the arg. "tolerance" is nice, but allclose has atol and rtol. My solution above only set atol, but both may be useful. Should we use: 2args: atol, rtol 2 args: atolerance, rtolerance 1 args: tolerance could be a number (->atol) or a tuple interpreted as atol, rtol = tolerance or a dict .... ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  combine_by_coords could use allclose instead of equal to compare coordinates 709503596
699523381 https://github.com/pydata/xarray/issues/4465#issuecomment-699523381 https://api.github.com/repos/pydata/xarray/issues/4465 MDEyOklzc3VlQ29tbWVudDY5OTUyMzM4MQ== shoyer 1217238 2020-09-26T17:20:25Z 2020-09-26T17:20:25Z MEMBER

See https://github.com/pydata/xarray/issues/2217 for related discussion about adding a tolerance parameter to alignment.

I think adding a tolerance parameter would be a welcome addition. It's not commutative, which is a little inelegant, but it's definitely a strict improvement over join='override'.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  combine_by_coords could use allclose instead of equal to compare coordinates 709503596
699498941 https://github.com/pydata/xarray/issues/4465#issuecomment-699498941 https://api.github.com/repos/pydata/xarray/issues/4465 MDEyOklzc3VlQ29tbWVudDY5OTQ5ODk0MQ== dcherian 2448579 2020-09-26T13:58:08Z 2020-09-26T13:58:08Z MEMBER

You can totally skip this comparison by specifying join="override" (since lat, lon are "indexes"; the join kwarg controls how they are aligned; override will skip the comparison and just use the lat or lon from the first dataset).

Adding tolerance seems OK to me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  combine_by_coords could use allclose instead of equal to compare coordinates 709503596

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 42.429ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows