We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems like a bug. Code to reproduce:
import numpy as np import xarray as xr arr = xr.DataArray(np.random.rand(3, 3, 100)) rolled = arr.rolling(dim_2=3) print(rolled.mean().dims) print(rolled.reduce(np.mean).dims)
Output:
('dim_0', 'dim_1', 'dim_2') ('dim_2', 'dim_0', 'dim_1')
P.S. Package version:
$ pip show xarray --- Metadata-Version: 2.0 Name: xarray Version: 0.8.2 Summary: N-D labeled arrays and datasets in Python Home-page: https://github.com/pydata/xarray Author: xarray Developers Author-email: xarray@googlegroups.com Installer: pip License: Apache Location: /usr/lib/python3.5/site-packages Requires: numpy, pandas Classifiers: Development Status :: 4 - Beta License :: OSI Approved :: Apache Software License Operating System :: OS Independent Intended Audience :: Science/Research Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Topic :: Scientific/Engineering
The text was updated successfully, but these errors were encountered:
I can reproduce this on master.
master
Indeed, it seems like we need something like GroupBy._restore_dim_order for rolling aggregations.
GroupBy._restore_dim_order
CC @jhamman
Sorry, something went wrong.
Agreed. This is not desirable. It should be simple enough to add _restore_dim_order to the Rolling object. @krvkir, care to give it a go?
_restore_dim_order
Rolling
@jhamman okay, I'll try to implement this on the next weekend.
Restoring dim order in rolling.reduce(). For pydata#1125
0e8a046
Successfully merging a pull request may close this issue.
Seems like a bug.
Code to reproduce:
Output:
P.S. Package version:
The text was updated successfully, but these errors were encountered: