issues: 462424005
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 462424005 | MDU6SXNzdWU0NjI0MjQwMDU= | 3066 | xarray rolling does not match pandas when using min_periods and reduce | 4903456 | open | 0 | 2 | 2019-06-30T16:44:09Z | 2021-02-18T21:41:57Z | NONE | MCVE Code SampleMCVE ```python import numpy as np import pandas as pd import xarray def custom(x, axis=0): return np.mean(x, axis) d = pd.DataFrame(np.random.rand(100,3)) r = d.rolling(10, min_periods=5).apply(custom) print(r.iloc[0:10,:]) xd = d.to_xarray().to_array() r = xd.rolling(index=10, min_periods=5).reduce(custom) print(r[:,0:10]) r = xd.rolling(index=10, min_periods=1).reduce(custom) print(r[:,0:10]) ``` Problem DescriptionI am applying a custom function on rolling windows with specific Expected Output and Actual Output
Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/3066/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | issue |