home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 438351586

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/1666#issuecomment-438351586 https://api.github.com/repos/pydata/xarray/issues/1666 438351586 MDEyOklzc3VlQ29tbWVudDQzODM1MTU4Ng== 7441788 2018-11-13T17:06:38Z 2018-11-13T17:06:38Z CONTRIBUTOR

I think there are actually a couple different ways Rolling.apply could work, but this seems like one possible way:

``` from xarray.core.utils import maybe_wrap_array from xarray.core.combine import concat

def rolling_apply(rolling, func, args, kwargs): applied = [maybe_wrap_array(label, func(arr, args, **kwargs)) for label, arr in rolling] combined = concat(applied, dim=rolling.obj.coords[rolling.dim]) return combined ```

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