home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1175235698

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/issues/6749#issuecomment-1175235698 https://api.github.com/repos/pydata/xarray/issues/6749 1175235698 IC_kwDOAMm_X85GDKxy 2448579 2022-07-05T16:09:55Z 2022-07-05T16:09:55Z MEMBER

This is quite confusing and I doubt it's intentional.

I would've expected b (y) int32 3 3 assuming that it would've been broadcast along the reduction dimension.

The final value is the result of

``` python import numpy as np from xarray.core.duck_array_ops import isnull

np.sum(np.logical_not(isnull(ds.b.data)), axis=())

np.sum([True, True], axis=())

```

What happens when you call a ufunc with an empty axis tuple? I bet this is just casting bool to int.

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