home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 779750462

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/4911#issuecomment-779750462 https://api.github.com/repos/pydata/xarray/issues/4911 779750462 MDEyOklzc3VlQ29tbWVudDc3OTc1MDQ2Mg== 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
}
  808558647
Powered by Datasette · Queries took 0.671ms · About: xarray-datasette