You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xr.quantile uses np.nanquantile which is slower than np.quantile but only needed when ignoring nans is needed. Adding skipna as kwarg would lead to a speedup for many use-cases.
%time _ = control.quantile(dim='time',q=q)
CPU times: user 4.95 s, sys: 34.3 ms, total: 4.98 s
Wall time: 5.88 s
%time _ = control.quantile(dim='time',q=q, skipna=False)
CPU times: user 85.3 ms, sys: 16.7 ms, total: 102 ms
Wall time: 127 ms
Problem Description
np.nanquantile not always needed
Versions
Output of `xr.show_versions()`
xr=0.15.1
The text was updated successfully, but these errors were encountered:
xr.quantile
usesnp.nanquantile
which is slower thannp.quantile
but only needed when ignoring nans is needed. Addingskipna
as kwarg would lead to a speedup for many use-cases.MCVE Code Sample
np.quantile
is much faster thannp.nanquantile
Expected Output
faster xr.quantile:
Problem Description
np.nanquantile not always needed
Versions
Output of `xr.show_versions()`
xr=0.15.1The text was updated successfully, but these errors were encountered: