home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 564303463

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/3607#issuecomment-564303463 https://api.github.com/repos/pydata/xarray/issues/3607 564303463 MDEyOklzc3VlQ29tbWVudDU2NDMwMzQ2Mw== 6815844 2019-12-10T23:16:51Z 2019-12-10T23:16:51Z MEMBER

@niowniow Thank you for your contribution!

I think stride option is a good idea. One thing is how to implement this efficient nan-reduction method.

Currently, we use 'bottleneck' if it is installed for speeding up nan-ops, but bottleneck does not support stride option. Another problem is inefficiency of nan-ops of numpy for strided arrays; he copies the strided array into full array and replace np.nan by zero before the reduction.

One way we could do is 1. skip using 'bottleneck' if stride is other than 1 2. implement our nan-ops for rolling. For example, for nansum, we can replace np.nan by 0 before creating the strided arrays and apply usual sum for the strided array.

In rolling.count, we did a similar thing.

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