sha,message,author_date,committer_date,raw_author,raw_committer,repo,author,committer bc5c79e5f79d8d7fbb1ed593a5413028a1bdfb36,"Improve typehints of xr.Dataset.__getitem__ (#4144) * Improve typehints of xr.Dataset.__getitem__ Resolves #4125 * Add overload for Mapping behavior Sadly this is not working with my version of mypy. See https://github.com/python/mypy/issues/7328 * Overload only Hashable inputs Given mypy's use of overloads, I think this is all we can do. If the argument is not Hashable, then return the Union type as before. * Lint * Quote the DataArray to avoid error in py3.6 * Code review Co-authored-by: crusaderky ",2020-06-15T11:25:52Z,2020-06-15T11:25:52Z,cac54aaf99307ae2c1b0a9d378f9016e48d1796c,cd792325681cbad9f663f2879d8b69f1edbb678f,13221727,1386642,19864447 9c0fb6c6ca4a4da52ba5b0c2b17c12573a66def0,"Add methods for combining variables of differing dimensionality (#1597) * Add stack_cat and unstack_cat methods This partially resolves #1317. Change names of methods stack_cat -> to_stacked_array unstack_cat -> to_unstacked_dataset Test that the dtype of the stacked dimensions is preserved This is not passing at the moment because concatenating None with a dimension that has values upcasts the combined dtype to object Fix dtypes of stacked dimensions This commit ensures that the dtypes of the stacked coordinate match the input dimensions. Use new index variable rather than patching the old one I didn't like the inplace modification of a private member. Handle variable_dim correctly I also fixed 1. f-string formatting issue 2. Use an OrderedDict as @jhamman recommends Add documentation to api.rst and reshaping.rst I also added appropriate See Also sections to the docstrings for to_stacked_array and to_unstacked_dataset. Add changes to whats-new Fixing style errors. Split up lengthy test Remove ""physical variable"" from docs This is in response to Joe's ""nit"" * Fix to_stacked_array with new master An error arose when checking for the precence of a dimension in array. The code 'dim in data' no longer works. Replaced this with 'dim in data.dims' * Move entry in whats-new to most recent release * Fix code styling errors It needs to pass `pycodestyle xarray` * Improve docstring of to_stacked_array Added example and additional description. * Move ""See Also"" section to end of docstring * Doc and comment improvements. * Improve documented example @benbovy pointed out that the old example was confusing. * Add name argument to to_stacked_array and test * Allow level argument to be an int or str * Remove variable_dim argument of to_unstacked_array * Actually removed variable_dim * Change function signature of to_stacked_array Previously, this function was passed a list of dimensions which should be stacked together. However, @benbovy found that the function failed when the _non-stacked_ dimensions were not shared across all variables. Thus, it is easier to specify the dimensions which should remain unchanged, rather than the dimensions to be stacked. The function to_stacked_array now takes an argument ''sample_dim'' which defines these non-stacked dimensions. If these dims are not shared accross all variables than an error is raised. * Fix lint error The line was too long * Fix validation and failing tests 1. the test which stacks a scalar and an array doesn't make sense anymore given the new API. 2. Fixed a bug in the validation code which raised an error almost always. * Fix typo * Improve docs and error messages * Remove extra spaces * Test warning in to_unstacked_dataset * Improve formatting and naming * Fix flake8 error * Respond to @max-sixty's suggestions",2019-07-05T00:32:50Z,2019-07-05T00:32:50Z,cac54aaf99307ae2c1b0a9d378f9016e48d1796c,f10b21bed2846b879806f87039b77245b18e7671,13221727,1386642,1217238 be27319bcf6a754f1655918fac45c1cd2cfa0cec,"Warn when pcolormesh coordinate is not sorted (#1885) Raise when pcolormesh coordinate is not sorted",2018-02-18T19:06:30Z,2018-02-18T19:06:30Z,cac54aaf99307ae2c1b0a9d378f9016e48d1796c,f10b21bed2846b879806f87039b77245b18e7671,13221727,1386642,1217238