home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 717107362

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/4541#issuecomment-717107362 https://api.github.com/repos/pydata/xarray/issues/4541 717107362 MDEyOklzc3VlQ29tbWVudDcxNzEwNzM2Mg== 10194086 2020-10-27T09:27:25Z 2020-10-27T09:27:25Z MEMBER

weights cannot contain NaNs else the result will just be NaN, even with skipna=True. But then the weights rarely contain NaN. So this test is a bit a trade-off between time and convenience. A kwarg can certainly make sense (was also requested before). I would probably not call the kwarg skipna. Maybe check_weights? or check_nan? (better names welcome)

I think da.isnull().any() is lazy and it's the if that makes it eager. So an alternative would be to make the statement lazy but I don't know how this would be done.

The relevant test is here: https://github.com/pydata/xarray/blob/adc55ac4d2883e0c6647f3983c3322ca2c690514/xarray/tests/test_weighted.py#L22

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