forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve attrs with coarsen (pydata#4360)
* pass **kwargs into _coarsen_reshape * change _replace to copy in coarsen return * copy back to replace, variable=copy * take out self.copy * update pre-commit config (tags not branches) * add test that coarsen maintains OG object * del comment * check global for keep attrs * black reformatter * line break * variable._attrs to variable.attrs * if not keep_attrs * {} to None * set_options goes in a with block * remove test dependency on netcdf * add bug fix to whats-new.rst * Update doc/whats-new.rst Co-authored-by: Deepak Cherian <[email protected]> * go back to v0.1.2 of blackdock * add test_coarsen_keep_attrs to test_dataarray.py * fix tests * black test_dataarray * xr.set_options * move keep_attrs to coarsen from _reshape_coarsen * flake8 * clean up * move keep_attrs to fx signature * remove kwarg check for keep_attrs * black on variable.py * fix test_variable * Format with black * fix test * check for global attribute * black variable.py * black test_variable.py * format w black * Update xarray/core/variable.py Co-authored-by: Deepak Cherian <[email protected]> Co-authored-by: Deepak Cherian <[email protected]> Co-authored-by: Maximilian Roos <[email protected]>
- Loading branch information
1 parent
66259d1
commit 572a528
Showing
7 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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