home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 269297904

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
269297904 MDU6SXNzdWUyNjkyOTc5MDQ= 1666 Could a DataArrayRolling object compute an arbitrary function on rolling windows? 8944955 closed 0     14 2017-10-28T08:53:16Z 2020-11-25T00:08:45Z 2020-11-25T00:08:45Z NONE      

What I'd like to do is something of this kind

Code Sample, a copy-pastable example if possible

```python da = xr.DataArray(range(10)) r = da.rolling(dim_0=2)

def func(x, axis, **kwargs): return x/x[-1] # for example

This is the desired functionality

generator = r.map(func) func_on_window = generator.next() # each time this is called, the rolling object returns func(window,...) ```

Desired output

```python generator.next()

[0,1]

generator.next()

[0.5,1]

generator.next()

[0.6666...,1]

... ```

This would be extremely useful to pipe data directly into a neural network for instance.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1666/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 14 rows from issue in issue_comments
Powered by Datasette · Queries took 0.78ms · About: xarray-datasette