home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

17 rows where author_association = "MEMBER" and issue = 522523336 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

  • keewis 8
  • dcherian 7
  • shoyer 1
  • max-sixty 1

issue 1

  • Add DatasetGroupBy.quantile · 17 ✖

author_association 1

  • MEMBER · 17 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
554574425 https://github.com/pydata/xarray/pull/3527#issuecomment-554574425 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDU3NDQyNQ== keewis 14808389 2019-11-15T23:55:14Z 2019-11-15T23:55:14Z MEMBER

Which behaviour can you reproduce?

python ds = xr.Dataset( data_vars={ "a": ( ("x", "y"), [[1, 11, 26], [2, 12, 22], [3, 13, 23], [4, 16,24], [5, 15, 25]], ) }, coords={"x": [1, 1, 1, 2, 2], "y": [0, 0, 1]}, ).expand_dims({"z": [0, 1, 1, 2, 2]}) a_ds = ds.groupby("y").std().a a_da = ds.a.groupby("y").std() a_ds.identical(a_da) which seems to be the same as python a_ds = ds.groupby("y").mean("y").a a_da = ds.a.groupby("y").mean("y") a_ds.identical(a_da) My impression is that this puts the dimension grouped over to the front: - before: ds.a.dims == ("z", "x", "y") - afterwards: a_ds.dims == ("y", "z", "x")

But I agree this discussion does not really belong here. So, thanks all!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554506074 https://github.com/pydata/xarray/pull/3527#issuecomment-554506074 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDUwNjA3NA== dcherian 2448579 2019-11-15T19:57:57Z 2019-11-15T19:57:57Z MEMBER

In it goes. Great work as usual, @keewis. Thanks!

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 2,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554500568 https://github.com/pydata/xarray/pull/3527#issuecomment-554500568 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDUwMDU2OA== shoyer 1217238 2019-11-15T19:41:41Z 2019-11-15T19:41:41Z MEMBER

the difference is here, where in DataArrayGroupBy the original dimension order is restored. DatasetGroupBy does not do that, so the test requires the transpose

It was not entirely obvious to me how to generalize "restoring dimension order" to Dataset. On a Dataset, it is not entirely clear which variable dimension order should be copied from. Maybe each variable in the result should have dimension order copied from the variable with the same name in the original dataset? But then what about new variables?

I agree @max-sixty, let's not worry about this too much for now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554498852 https://github.com/pydata/xarray/pull/3527#issuecomment-554498852 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQ5ODg1Mg== max-sixty 5635139 2019-11-15T19:36:50Z 2019-11-15T19:36:50Z MEMBER

Dimension reordering has come up a few times before (https://github.com/pydata/xarray/issues/1739, and others that I can't immediately find)

I think we should probably have a general solution & standard behavior here. Others should weigh in (CC @shoyer), but I would vote to not worry too much about it here, and prioritize simplicity and consistency with past behavior until we decide on a more general solution.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554479160 https://github.com/pydata/xarray/pull/3527#issuecomment-554479160 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQ3OTE2MA== dcherian 2448579 2019-11-15T18:39:44Z 2019-11-15T18:39:44Z MEMBER

I can also reproduce this with std

Which behaviour can you reproduce?

Replacing mean with std in my last example passes the identical check. Actually this works too

a_ds = ds.groupby("y").apply(lambda x: x).a a_da = ds.a.groupby("y").apply(lambda x: x) a_ds.identical(a_da)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554428708 https://github.com/pydata/xarray/pull/3527#issuecomment-554428708 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQyODcwOA== keewis 14808389 2019-11-15T16:24:19Z 2019-11-15T17:03:40Z MEMBER

I can also reproduce this with std

Edit: I'm fairly certain this is due to what I mentioned in https://github.com/pydata/xarray/pull/3527#issuecomment-553994537

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554427971 https://github.com/pydata/xarray/pull/3527#issuecomment-554427971 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQyNzk3MQ== keewis 14808389 2019-11-15T16:22:41Z 2019-11-15T16:22:41Z MEMBER

but that's only because mean removes x, doesn't it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554427515 https://github.com/pydata/xarray/pull/3527#issuecomment-554427515 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQyNzUxNQ== dcherian 2448579 2019-11-15T16:21:37Z 2019-11-15T16:21:37Z MEMBER

Hmm.. ok calling mean in this example passes the identical check so maybe there's something funny in quantile:

ds = xr.Dataset( data_vars={ "a": ( ("x", "y"), [[1, 11, 26], [2, 12, 22], [3, 13, 23], [4, 16,24], [5, 15, 25]], ) }, coords={"x": [1, 1, 1, 2, 2], "y": [0, 0, 1]}, ).expand_dims({"z": [0,1,2]}) a_ds = ds.groupby("y").mean("x").a a_da = ds.a.groupby("y").mean("x") a_ds.identical(a_da)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554404625 https://github.com/pydata/xarray/pull/3527#issuecomment-554404625 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDQwNDYyNQ== keewis 14808389 2019-11-15T15:29:53Z 2019-11-15T15:29:53Z MEMBER

well, it was surprising to me. It also might be problematic that it matters if we first pull out a DataArray and then compute or the other way around: ```python

ds = xr.Dataset( ... data_vars={ ... "a": ( ... ("x", "y"), ... [[1, 11, 26], [2, 12, 22], [3, 13, 23],^I[4, 16,^I24], [5, 15, 25]], ... ) ... }, ... coords={"x": [1, 1, 1, 2, 2], "y": [0, 0, 1]}, ... ) a_ds = ds.groupby("y").quantile(0).a a_da = ds.a.groupby("y").quantile(0) a_ds.identical(a_da) False a_ds.transpose().identical(a_da) True ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554395077 https://github.com/pydata/xarray/pull/3527#issuecomment-554395077 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDM5NTA3Nw== dcherian 2448579 2019-11-15T15:07:55Z 2019-11-15T15:07:55Z MEMBER

:+1:

The transpose is fine, I think. It looks intentional and must be consistent with other Dataset/DataArray operations?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554394159 https://github.com/pydata/xarray/pull/3527#issuecomment-554394159 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDM5NDE1OQ== keewis 14808389 2019-11-15T15:05:34Z 2019-11-15T15:05:34Z MEMBER

sure. But as Dataset.quantile and DataArray.quantile don't have examples either, I think it might be worth to do that in a new PR?

Also, what will we do re transpose?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
554391733 https://github.com/pydata/xarray/pull/3527#issuecomment-554391733 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1NDM5MTczMw== dcherian 2448579 2019-11-15T14:59:21Z 2019-11-15T14:59:21Z MEMBER

LGTM @keewis.

Re: docstring. If you jave time, can you add a couple of examples (just pick two from the tests) to illustrate the scalar vs vector behaviour of q?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
553994537 https://github.com/pydata/xarray/pull/3527#issuecomment-553994537 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1Mzk5NDUzNw== keewis 14808389 2019-11-14T17:31:58Z 2019-11-14T17:58:54Z MEMBER

the difference is here, where in DataArrayGroupBy the original dimension order is restored. DatasetGroupBy does not do that, so the test requires the transpose

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
553650734 https://github.com/pydata/xarray/pull/3527#issuecomment-553650734 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1MzY1MDczNA== dcherian 2448579 2019-11-13T23:21:57Z 2019-11-13T23:21:57Z MEMBER

:+1:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
553650563 https://github.com/pydata/xarray/pull/3527#issuecomment-553650563 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1MzY1MDU2Mw== keewis 14808389 2019-11-13T23:21:23Z 2019-11-13T23:21:23Z MEMBER

that would open a new category. Should I use New Features?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
553650044 https://github.com/pydata/xarray/pull/3527#issuecomment-553650044 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1MzY1MDA0NA== dcherian 2448579 2019-11-13T23:19:50Z 2019-11-13T23:19:50Z MEMBER

Let's do enhancements!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336
553647261 https://github.com/pydata/xarray/pull/3527#issuecomment-553647261 https://api.github.com/repos/pydata/xarray/issues/3527 MDEyOklzc3VlQ29tbWVudDU1MzY0NzI2MQ== keewis 14808389 2019-11-13T23:10:34Z 2019-11-13T23:10:34Z MEMBER

is Bug Fixes the correct section for this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add DatasetGroupBy.quantile 522523336

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