-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
preserve original dimension, coordinate and variable order in concat
#4419
Merged
max-sixty
merged 9 commits into
pydata:master
from
kmuehlbauer:preserve-var-order-concat
Sep 19, 2020
Merged
preserve original dimension, coordinate and variable order in concat
#4419
max-sixty
merged 9 commits into
pydata:master
from
kmuehlbauer:preserve-var-order-concat
Sep 19, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
keewis
reviewed
Sep 14, 2020
keewis
approved these changes
Sep 14, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except from a few stylistic issues (which I think make reading the code easer), this looks good to me.
Co-authored-by: keewis <[email protected]>
keewis
reviewed
Sep 14, 2020
thanks and sorry for that, I guess the error was caused by me proposing changes without testing they would actually work |
dcherian
approved these changes
Sep 15, 2020
Thanks @kmuehlbauer ! |
dcherian
added a commit
to dcherian/xarray
that referenced
this pull request
Oct 9, 2020
…pagate-attrs * 'propagate-attrs' of github.com:dcherian/xarray: (22 commits) silence sphinx warnings about broken rst (pydata#4448) Xarray open_mfdataset with engine Zarr (pydata#4187) Fix release notes formatting (pydata#4443) fix typo in io.rst (pydata#4250) Fix typo (pydata#4181) Fix release notes typo New whatsnew section Add notes re doctests (pydata#4440) Fixed dask.optimize on datasets (pydata#4438) Release notes for 0.16.1 (pydata#4435) Small updates to How-to-release + lint (pydata#4436) Fix doctests (pydata#4439) add a ci for doctests (pydata#4437) preserve original dimension, coordinate and variable order in ``concat`` (pydata#4419) Fix for h5py deepcopy issues (pydata#4426) Keep the original ordering of the coordinates (pydata#4409) Clearer Vectorized Indexing example (pydata#4433) Revert "Fix optimize for chunked DataArray (pydata#4432)" (pydata#4434) Fix optimize for chunked DataArray (pydata#4432) fix doc dataarray to netcdf (pydata#4424) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem is that the
result_vars
-dict is filled in two separate loops, handling variables and coordinates (AFAICT). This can change the ordering of dimensions and coordinates depending over which dimensions is concatenated.This fix hooks into the second loop and reinsert the variable in question at the appropriate position by popping it out of the
result_vars
. There might be a more elegant solution to this.isort . && black . && mypy . && flake8
whats-new.rst
api.rst