issues: 1296475783
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1296475783 | I_kwDOAMm_X85NRqaH | 6759 | DataArray.rolling.reduce() does not apply correctly numpy.nanpercentile | 90059220 | closed | 0 | 2 | 2022-07-06T21:10:59Z | 2022-07-07T02:05:47Z | 2022-07-07T02:05:47Z | NONE | What is your issue?I stumbled upon the issue of not having a simple Here is the code I used to test it out: ``` python import xarray as xr, numpy as np m,n = 30,56 tab = np.random.uniform(0, 100, size=(m,n)) ds = xr.DataArray(tab) ds.plot.imshow(center=False) nb_nan = 8 tab.ravel()[np.random.choice(tab.size, nb_nan, replace=False)] = np.nan ds_nan = xr.DataArray(tab) ds_nan.plot.imshow(center=False) w = 4 roll = ds_nan.rolling({name: w for name in ['dim_0', 'dim_1']}, center = True) roll_perc = roll.reduce(np.percentile, q=90) roll_perc.plot.imshow(center=False) roll_perc_nan = roll.reduce(np.nanpercentile, q=90) roll_perc_nan.plot.imshow(center=False) |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/6759/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |