home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 808558647 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • bcbnz 2
  • mathause 2
  • dcherian 1
  • keewis 1

author_association 2

  • MEMBER 4
  • CONTRIBUTOR 2

issue 1

  • Fix behaviour of min_count in reducing functions · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
781910976 https://github.com/pydata/xarray/pull/4911#issuecomment-781910976 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc4MTkxMDk3Ng== mathause 10194086 2021-02-19T08:12:38Z 2021-02-19T08:12:38Z MEMBER

Thanks @bcbnz. I see this is your first PR here - welcome to xarray!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647
780878085 https://github.com/pydata/xarray/pull/4911#issuecomment-780878085 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc4MDg3ODA4NQ== mathause 10194086 2021-02-17T21:51:19Z 2021-02-17T21:51:19Z MEMBER

I think we can merge this before the weekend, unless someone objects?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647
779750462 https://github.com/pydata/xarray/pull/4911#issuecomment-779750462 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc3OTc1MDQ2Mg== bcbnz 367900 2021-02-16T10:40:28Z 2021-02-16T10:40:28Z CONTRIBUTOR

Not for this PR but I wonder if xr.DataArray([1]).sum(min_count=2) should actually return NA.

It would make it more consistent, the current behaviour is

  • xr.DataArray([1]).sum(min_count=2) -> 1
  • xr.DataArray([1.0]).sum(min_count=2) -> nan

due to the different dtype defaults for skipna. I guess this would require rework of the dispatch logic in xarray.core.duck_array_ops._create_nan_agg_method to make it call nansum/nanprod when appropriate (e.g., should setting min_count imply skipna=True?).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647
779709464 https://github.com/pydata/xarray/pull/4911#issuecomment-779709464 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc3OTcwOTQ2NA== bcbnz 367900 2021-02-16T09:36:32Z 2021-02-16T09:36:32Z CONTRIBUTOR
  • Changed to use duck_array_ops.where
  • Docstring updated and entry added to breaking changes of whats new (I assumed this was appropriate). Note its a bit more nuanced than @mathause stated: for an integer array, skipna defaults to False and so xarray.core.duck_array_ops._create_nan_agg_method does not call nansum. This means you have to force skipna=True to see the difference:
    • master: xr.DataArray([1]).sum(min_count=1).dtype -> int64
    • this PR: xr.DataArray([1]).sum(min_count=1).dtype -> int64
    • master: xr.DataArray([1]).sum(skipna=True, min_count=1).dtype -> int64
    • this PR: xr.DataArray([1]).sum(skipna=True, min_count=1).dtype -> float64

Hopefully this is clear in the docstring changes, suggestions welcome.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647
779507029 https://github.com/pydata/xarray/pull/4911#issuecomment-779507029 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc3OTUwNzAyOQ== keewis 14808389 2021-02-16T00:23:09Z 2021-02-16T00:23:41Z MEMBER

We can use the where_method from duck_array_ops instead of np.where

even better would be duck_array_ops.where (it is closer to np.where)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647
779505394 https://github.com/pydata/xarray/pull/4911#issuecomment-779505394 https://api.github.com/repos/pydata/xarray/issues/4911 MDEyOklzc3VlQ29tbWVudDc3OTUwNTM5NA== dcherian 2448579 2021-02-16T00:18:01Z 2021-02-16T00:18:01Z MEMBER

looks like np.where is not yet lazy in dask 2.9.2

We can use the where_method from duck_array_ops instead of np.where

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix behaviour of min_count in reducing functions 808558647

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