home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 716399575

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/4325#issuecomment-716399575 https://api.github.com/repos/pydata/xarray/issues/4325 716399575 MDEyOklzc3VlQ29tbWVudDcxNjM5OTU3NQ== 10194086 2020-10-26T08:40:51Z 2021-02-18T15:39:40Z MEMBER

This is already done for counts, correct? Here:

https://github.com/pydata/xarray/blob/1597e3a91eaf96626725987d23bbda2a80d2bae7/xarray/core/rolling.py#L370-L382

This should work for most of the reductions (and is a bit similar to what is done in weighted for mean and sum):

  • [x] count: isnull() -> rolling -> sum
  • [x] argmax: fillna(-inf) -> rolling -> argmax
  • [x] argmin: fillna(inf) -> rolling -> argmin
  • [x] max: fillna(-inf) -> rolling -> max (not sure about this one, need to be careful with the dtype)
  • [x] min: fillna(inf) -> rolling -> min (dito)
  • [x] mean: fillna(0) -> rolling -> sum / count (ensure nan if count == 0)
  • [x] prod: fillna(1) -> rolling -> prod
  • [x] sum: fillna(0) -> rolling -> sum
  • [ ] var: fillna(0) -> rolling -> possible (?) but a bit more involved
  • [ ] std: sqrt(var)
  • [ ] median: probably not possible

I think this should not be too difficult, the thing is that rolling itself is already quite complicated

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