forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge upstream changes #6
Merged
Merged
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
…ns with size>1 (#2757) * Quarter offset implemented (base is now latest pydata-master). (#2721) * Quarter offset implemented (base is now latest pydata-master). * Fixed issues raised in review (#2721 (review)) * Updated whats-new.rst with info on quarter offset support. * Updated whats-new.rst with info on quarter offset support. * Update doc/whats-new.rst Co-Authored-By: jwenfai <jwenfai@gmail.com> * Added support for quarter frequencies when resampling CFTimeIndex. Less redundancy in CFTimeIndex resampling tests. * Removed normalization code (unnecessary for cftime_range) in cftime_offsets.py. Removed redundant lines in whats-new.rst. * Removed invalid option from _get_day_of_month docstring. Added tests back in that raises ValueError when resampling (base=24 when resampling to daily freq, e.g., '8D'). * Minor edits to docstrings/comments * lint * Add `Dataset.drop_dims` (#2767) * ENH: Add Dataset.drop_dims() * Drops full dimensions and any corresponding variables in a Dataset * Fixes GH1949 * DOC: Add Dataset.drop_dims() documentation * Improve name concat (#2792) * Added tests of desired name inferring behaviour * Infers names * updated what's new * Don't use deprecated np.asscalar() (#2800) It got deprecated in numpy 1.16 and throws a ton of warnings due to that. All the function does is returning .item() anyway, which is why it got deprecated. * Add support for cftime.datetime coordinates with coarsen (#2778) * some docs updates (#2746) * Friendlier io title. * Fix lists. * Fix *args, **kwargs "inline emphasis..." * misc * Reference xarray_extras for csv writing. Closes #2289 * Add metpy accessor. Closes #461 * fix transpose docstring. Closes #2576 * Revert "Fix lists." This reverts commit 39983a5. * Revert "Fix *args, **kwargs" This reverts commit 1b9da35. * Add MetPy to related projects. * Add Weather and Climate specific page. * Add hvplot. * Note open_dataset, mfdataset open files as read-only (closes #2345). * Update metpy 1 Co-Authored-By: dcherian <dcherian@users.noreply.github.com> * Update doc/weather-climate.rst Co-Authored-By: dcherian <dcherian@users.noreply.github.com> * Drop failing tests writing multi-dimensional arrays as attributes (#2810) These aren't valid for netCDF files. Fixes GH2803 * Push back finalizing deprecations for 0.12 (#2809) 0.12 will already have a big change in dropping Python 2.7 support. I'd rather wait a bit longer to finalize these deprecations to minimize the impact on users. * enable loading remote hdf5 files (#2782) * attempt at loading remote hdf5 * added a couple tests * rewind bytes after reading header * addressed comments for tests and error message * fixed pep8 formatting * created _get_engine_from_magic_number function, new tests * added description in whats-new * fixed test failure on windows * same error on windows and nix * Release 0.12.0 * Add whats-new for 0.12.1 * Rework whats-new for 0.12 * DOC: Update donation links * DOC: remove outdated warning (#2818) * Allow expand_dims() method to support inserting/broadcasting dimensions with size>1 (#2757) * Make using dim_kwargs for python 3.5 illegal -- a ValueError is thrown * dataset.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * dataarray.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * Add alternative option to passing a dict to the dim argument, which is now an optional kwarg, passing in each new dimension as its own kwarg * Add expand_dims enhancement from issue 2710 to whats-new.rst * Fix test_dataarray.TestDataArray.test_expand_dims_with_greater_dim_size tests to pass in python 3.5 using ordered dicts instead of regular dicts. This was needed because python 3.5 and earlier did not maintain insertion order for dicts * Restrict core logic to use 'dim' as a dict--it will be converted into a dict on entry if it is a str or a sequence of str * Don't cast dim values (coords) as a list since IndexVariable/Variable will internally convert it into a numpy.ndarray. So just use IndexVariable((k,), v) * TypeErrors should be raised for invalid input types, rather than ValueErrors. * Force 'dim' to be OrderedDict for python 3.5 * Allow expand_dims() method to support inserting/broadcasting dimensions with size>1 (#2757) * use .size attribute to determine the size of a dimension, rather than converting to a list, which can be slow for large iterables * Make using dim_kwargs for python 3.5 illegal -- a ValueError is thrown * dataset.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * dataarray.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * Add alternative option to passing a dict to the dim argument, which is now an optional kwarg, passing in each new dimension as its own kwarg * Add expand_dims enhancement from issue 2710 to whats-new.rst * Fix test_dataarray.TestDataArray.test_expand_dims_with_greater_dim_size tests to pass in python 3.5 using ordered dicts instead of regular dicts. This was needed because python 3.5 and earlier did not maintain insertion order for dicts * Restrict core logic to use 'dim' as a dict--it will be converted into a dict on entry if it is a str or a sequence of str * Don't cast dim values (coords) as a list since IndexVariable/Variable will internally convert it into a numpy.ndarray. So just use IndexVariable((k,), v) * TypeErrors should be raised for invalid input types, rather than ValueErrors. * Force 'dim' to be OrderedDict for python 3.5 * Allow expand_dims() method to support inserting/broadcasting dimensions with size>1 (#2757) * Move enhancement description up to 0.12.1 * use .size attribute to determine the size of a dimension, rather than converting to a list, which can be slow for large iterables * Make using dim_kwargs for python 3.5 illegal -- a ValueError is thrown * dataset.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * dataarray.expand_dims() method take dict like object where values represent length of dimensions or coordinates of dimesnsions * Add alternative option to passing a dict to the dim argument, which is now an optional kwarg, passing in each new dimension as its own kwarg * Add expand_dims enhancement from issue 2710 to whats-new.rst * Fix test_dataarray.TestDataArray.test_expand_dims_with_greater_dim_size tests to pass in python 3.5 using ordered dicts instead of regular dicts. This was needed because python 3.5 and earlier did not maintain insertion order for dicts * Restrict core logic to use 'dim' as a dict--it will be converted into a dict on entry if it is a str or a sequence of str * Don't cast dim values (coords) as a list since IndexVariable/Variable will internally convert it into a numpy.ndarray. So just use IndexVariable((k,), v) * TypeErrors should be raised for invalid input types, rather than ValueErrors. * Force 'dim' to be OrderedDict for python 3.5
* Fixing deepcopy for Dataset.attrs + adjusting testcase * removing extra newlines * Updating whats-new * PEP8 * Adding attrs-test to the shallow copy testcase Removing additional argument of Dataset._replace * Rename _attrs -> attrs
* Various fixes for explicit Dataset.indexes Fixes GH2856 I've added internal consistency checks to the uses of ``assert_equal`` in our test suite, so this shouldn't happen again. * Fix indexes in Dataset.interp
* typing for core.common and core.utils * Cleanup of core.common core.utils * Remove ambiguous overload See: https://mypy.readthedocs.io/en/latest/more_types.html#type-checking-the-variants * dims are generic Hashable; support for Python 3.5.0~3.5.2 * fixes * fixes * More polish for common and utils * More polish for common and utils * More polish for common and utils * code review
* Reduce length of cftime resample tests * Update per @jwenfai's suggestions; silence to_datetimeindex warnings * Restore 91% coverage for resample_cftime.py
* BUG: Fix #2864 by adding the missing vrt parameters (transform, width, height) * TEST: Add a test to demonstrate that #2864 is actually fixed by patch * DOC: Add an entry corresponding to the patch in whats-new.rst * STY: Conform to PEP 8 * TEST: Fix test imports and assert for the affine transform check
* Indexing with an empty array Closes #2882 * Adds 2882 resolution to whats-new.rst * Create empty indexing array directly * assert xxx -> asset_identical
BUG: Fix #2770 by changing ~ to np.logical_not() TST: Add test for scalar datetime64 value DOC: Add to whats-new.rst
* Added docs example for `xarray.Dataset.get()` * Revised data_structures example
See also pull-request #2860.
This might help to avoid confusion. data_vars is always a mapping, not a mapping, a variable or a tuple.
* added manual chunks for open_zarr * updated whats-new * fixed pep8 issues * removed whitespace * added deprecation warning * fixed pep8 issues * added warning for bad chunks * fixed lingering rebase conflicts * fixed pep8 issues * added stacklevel * fixed pep8 issues * Various fixes for explicit Dataset.indexes (#2858) * Various fixes for explicit Dataset.indexes Fixes GH2856 I've added internal consistency checks to the uses of ``assert_equal`` in our test suite, so this shouldn't happen again. * Fix indexes in Dataset.interp * 0.12.1 release * revert to 0.12.2 dev * update links to https (#2872) * Fix mypy typing error in cftime_offsets.py (#2878) * decreased pytest verbosity (#2881) * added manual chunks for open_zarr * updated whats-new * fixed pep8 issues * removed whitespace * added deprecation warning * fixed pep8 issues * added warning for bad chunks * fixed lingering rebase conflicts * fixed pep8 issues * added stacklevel * fixed pep8 issues * disallow unicode again * disallow unicode again
* docs: Move quick overview one level up * More text on attributes. * minor text updates. * Mention open,save_mfdataset * Add some dataset text. * Link to other sections in docs. * minor edits. * shoyer edits
Updates formatting to use .format() instead of % operator. Changed all instances of % to .format() and added test for using tuple as key, which errored using % operator. pep8 Remove positional indexes and fix !r formatting bug
* Handle the charachter array dim name in a variables encoding, set in decode and reapply in encode * Document char_dim_name * Minor change to set of char_dim_name * Test the roundtrip of the char_dim_name in encoding. * pep8 or die * Better test for char_dim_name * pep8 79char madness * nix test logic, use multiple parameterized vars * When encoding and encoding, remove it from encoding * Simpler is better * pep8 visual indent complaint * what is new! * what is newer than new! * what is newer than newer! * what is newer than newer-er! * what is newer than newer-est!
* Avoid downloading .tif file Simplify by using that rasterio can read directly from http. This also removes imports of requests and os. * let rasterio handle the http * pep 8 * pep8
* list formatting in docs * pep8
* Attempt to fix py35 build on Travis This build is currently install NumPy 1.11, which isn't supported by xarray. Maybe adding minimum numpy and pandas versions will help. * fix pandas version * remove py35 build entirely * xfail failing test
* add fill_value option to align and reindex functions * add fill_value tests for reindex and align * add fill_value option for merge functions * add tests for fill_value merge implementation * implement and test fill_value option in dataaarray reindex methods * fix PEP 8 issue * move function signature onto function * Add fill_value enhancement note
* Base classes in Python 3 don't need to subclass object * What's new
* plot: If provided with colormap do not modify it. * lint * pep8 * Fixes. * More fixes. * autopep8 * more pep8 * whats-new under bugfixes * Simpler colormap check. * lint. * @requires_matplotlib why is this needed? * Fix test * neaten * update comment.
…looks like the test fails for the shallow copy, and apparently only on Windows for some reason. In Windows coords seem to be immutable unless it's one dataarray deep copied from another (which is why only the deep=False test fails). (#2953)
* Added xclim to related projects * Update related-projects.rst
We don't want 10000 lines printing every single test :)
* Partial fix for #2841 to improve formatting. Updates formatting to use .format() instead of % operator. Changed all instances of % to .format() and added test for using tuple as key, which errored using % operator. * Revert "Partial fix for #2841 to improve formatting." This reverts commit f17f3ad. * Implement load_dataset() and load_dataarray() BUG: Fixes #2887 by adding @shoyer solution for load_dataset and load_dataarray, wrappers around open_dataset and open_dataarray which open, load, and close the file and return the Dataset/DataArray TST: Add tests for sequentially opening and writing to files using new functions DOC: Add to whats-new.rst. Also a tiny change to the open_dataset docstring Update docstrings and check for cache in kwargs Undeprecate load_dataset Add to api.rst, fix whats-new.rst typo, raise error instead of warning
* The example was using the wrong name for the function (to_datarray), and used the wrong dimension for the window
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.
No description provided.