home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER" and issue = 1523260646 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
  • Illviljan 1

issue 1

  • Change .groupby fastpath to work for monotonic increasing and decreasing · 3 ✖

author_association 1

  • MEMBER · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1445221673 https://github.com/pydata/xarray/pull/7427#issuecomment-1445221673 https://api.github.com/repos/pydata/xarray/issues/7427 IC_kwDOAMm_X85WJFUp Illviljan 14371165 2023-02-25T22:51:37Z 2023-02-25T22:51:37Z MEMBER

This one is failing on CI / ubuntu-latest py3.9 bare-minimum, is it taking a path without flox installed perhaps?

``` __ TestDataArrayGroupBy.testgroupby_fastpath_for_monotonic ___ [gw2] linux -- Python 3.9.16 /home/runner/micromamba-root/envs/xarray-tests/bin/python

self = <xarray.tests.test_groupby.TestDataArrayGroupBy object at 0x7fbd9f461c10>

def test_groupby_fastpath_for_monotonic(self):
    # Fixes https://github.com/pydata/xarray/issues/6220
    index = [1, 2, 3, 4, 7, 9, 10]
    array = DataArray(np.arange(len(index)), [("idx", index)])
    array_rev = array.copy().assign_coords({"idx": index[::-1]})
    fwd = array.groupby("idx", squeeze=False)
    rev = array_rev.groupby("idx", squeeze=False)

    for gb in [fwd, rev]:
        assert all([isinstance(elem, slice) for elem in gb._group_indices])

    assert_identical(fwd.sum(), array)
  assert_identical(rev.sum(), array_rev.sortby("idx"))

E AssertionError: Left and right DataArray objects are not identical E
E Differing values: E L E array([0, 1, 2, 3, 4, 5, 6]) E R E array([6, 5, 4, 3, 2, 1, 0]) E Differing coordinates: E L * idx (idx) int64 10 9 7 4 3 2 1 E R * idx (idx) int64 1 2 3 4 7 9 10 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change .groupby fastpath to work for monotonic increasing and decreasing 1523260646
1401009603 https://github.com/pydata/xarray/pull/7427#issuecomment-1401009603 https://api.github.com/repos/pydata/xarray/issues/7427 IC_kwDOAMm_X85TgbXD dcherian 2448579 2023-01-23T21:30:23Z 2023-01-23T21:30:23Z MEMBER

TO check the fastpath we'd want to both get the right answer and make sure that _group_indices is filled with slices: https://github.com/pydata/xarray/blob/4f3128bb7266d1a6fdeaf20718ea3f8286fe041e/xarray/core/groupby.py#L422-L430

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change .groupby fastpath to work for monotonic increasing and decreasing 1523260646
1381060983 https://github.com/pydata/xarray/pull/7427#issuecomment-1381060983 https://api.github.com/repos/pydata/xarray/issues/7427 IC_kwDOAMm_X85SUVF3 dcherian 2448579 2023-01-12T22:23:14Z 2023-01-12T22:23:47Z MEMBER

Thanks @JoelJaeschke!

The intent was to change the code in _unique_and_monotonic here

A good test would be make sure you get the same answer when grouping a DataArray of ones by a monotonically increasing variable (e.g. [1, 1, 2, 2, 3, 3, 3]) and the decreasing variable( e.g. [3, 3, 3, 2, 2, 1, 1])

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Change .groupby fastpath to work for monotonic increasing and decreasing 1523260646

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