home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1373979208

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/7424#issuecomment-1373979208 https://api.github.com/repos/pydata/xarray/issues/7424 1373979208 IC_kwDOAMm_X85R5UJI 14371165 2023-01-06T18:18:56Z 2023-01-15T16:09:05Z MEMBER

The array api standard doesn't define any nan*-functions. xarray pretty much always defaults to using nan*-function. :(

So any time an array has a __array_namespace__ we have to use our own nan-solution, like for .sum: https://github.com/pydata/xarray/blob/d6d24507793af9bcaed79d7f8d3ac910e176f1ce/xarray/core/duck_array_ops.py#L288-L295

Any thoughts? Are there any clever ways to handle the aggregations with NaNs in a generic way?

edit: numpy implementations: https://github.com/numpy/numpy/blob/main/numpy/lib/nanfunctions.py

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1522810384
Powered by Datasette · Queries took 0.682ms · About: xarray-datasette