Skip to content

Commit

Permalink
Merge branch 'master' into fix/4107
Browse files Browse the repository at this point in the history
* master:
  Add initial cupy tests (pydata#4214)
  Add 0.16.0 release summary
  New whatsnew section
  Release v0.16.0
  Minor reorg of whatsnew for 0.16.0 (pydata#4216)
  fix sphinx warnings (pydata#4199)
  pin isort (pydata#4206)
  get the colorbar label via public methods (pydata#4201)
  Bump minimum versions for 0.16 release (pydata#4175)
  Allow passing axis kwargs to plot (pydata#4020)
  Fix to_unstacked_dataset for single dimension variables. (pydata#4094)
  Improve the speed of from_dataframe with a MultiIndex (by 40x!) (pydata#4184)
  More pint compatibility: silence UnitStrippedWarnings (pydata#4163)
  Fix typo (pydata#4192)
  use the latest image of RTD (pydata#4191)
  • Loading branch information
dcherian committed Jul 14, 2020
2 parents 2620ad6 + 52043bc commit 2b39154
Show file tree
Hide file tree
Showing 27 changed files with 1,269 additions and 712 deletions.
24 changes: 24 additions & 0 deletions asv_bench/benchmarks/pandas.py
@@ -0,0 +1,24 @@
import numpy as np
import pandas as pd

from . import parameterized


class MultiIndexSeries:
def setup(self, dtype, subset):
data = np.random.rand(100000).astype(dtype)
index = pd.MultiIndex.from_product(
[
list("abcdefhijk"),
list("abcdefhijk"),
pd.date_range(start="2000-01-01", periods=1000, freq="B"),
]
)
series = pd.Series(data, index)
if subset:
series = series[::3]
self.series = series

@parameterized(["dtype", "subset"], ([int, float], [True, False]))
def time_to_xarray(self, dtype, subset):
self.series.to_xarray()
9 changes: 4 additions & 5 deletions ci/requirements/py36-min-all-deps.yml
Expand Up @@ -15,22 +15,21 @@ dependencies:
- cfgrib=0.9
- cftime=1.0
- coveralls
- dask=2.5
- distributed=2.5
- dask=2.9
- distributed=2.9
- flake8
- h5netcdf=0.7
- h5py=2.9 # Policy allows for 2.10, but it's a conflict-fest
- hdf5=1.10
- hypothesis
- iris=2.2
- isort
- isort=4.3.21
- lxml=4.4 # Optional dep of pydap
- matplotlib=3.1
- msgpack-python=0.6 # remove once distributed is bumped. distributed GH3491
- mypy=0.761 # Must match .pre-commit-config.yaml
- nc-time-axis=1.2
- netcdf4=1.4
- numba=0.44
- numba=0.46
- numpy=1.15
- pandas=0.25
# - pint # See py36-min-nep18.yml
Expand Down
8 changes: 3 additions & 5 deletions ci/requirements/py36-min-nep18.yml
Expand Up @@ -6,17 +6,15 @@ dependencies:
# require drastically newer packages than everything else
- python=3.6
- coveralls
- dask=2.5
- distributed=2.5
- msgpack-python=0.6 # remove once distributed is bumped. distributed GH3491
- dask=2.9
- distributed=2.9
- numpy=1.17
- pandas=0.25
- pint=0.13
- pip
- pytest
- pytest-cov
- pytest-env
- scipy=1.2
- setuptools=41.2
- sparse=0.8
- pip:
- pint==0.13
4 changes: 2 additions & 2 deletions ci/requirements/py36.yml
Expand Up @@ -19,7 +19,7 @@ dependencies:
- hdf5
- hypothesis
- iris
- isort
- isort=4.3.21
- lxml # Optional dep of pydap
- matplotlib
- mypy=0.761 # Must match .pre-commit-config.yaml
Expand All @@ -28,6 +28,7 @@ dependencies:
- numba
- numpy
- pandas
- pint
- pip
- pseudonetcdf
- pydap
Expand All @@ -44,4 +45,3 @@ dependencies:
- zarr
- pip:
- numbagg
- pint
4 changes: 2 additions & 2 deletions ci/requirements/py37-windows.yml
Expand Up @@ -19,7 +19,7 @@ dependencies:
- hdf5
- hypothesis
- iris
- isort
- isort=4.3.21
- lxml # Optional dep of pydap
- matplotlib
- mypy=0.761 # Must match .pre-commit-config.yaml
Expand All @@ -28,6 +28,7 @@ dependencies:
- numba
- numpy
- pandas
- pint
- pip
- pseudonetcdf
- pydap
Expand All @@ -44,4 +45,3 @@ dependencies:
- zarr
- pip:
- numbagg
- pint
4 changes: 2 additions & 2 deletions ci/requirements/py37.yml
Expand Up @@ -19,7 +19,7 @@ dependencies:
- hdf5
- hypothesis
- iris
- isort
- isort=4.3.21
- lxml # Optional dep of pydap
- matplotlib
- mypy=0.761 # Must match .pre-commit-config.yaml
Expand All @@ -28,6 +28,7 @@ dependencies:
- numba
- numpy
- pandas
- pint
- pip
- pseudonetcdf
- pydap
Expand All @@ -44,4 +45,3 @@ dependencies:
- zarr
- pip:
- numbagg
- pint
4 changes: 2 additions & 2 deletions ci/requirements/py38-all-but-dask.yml
Expand Up @@ -16,7 +16,7 @@ dependencies:
- h5py
- hdf5
- hypothesis
- isort
- isort=4.3.21
- lxml # Optional dep of pydap
- matplotlib
- mypy=0.761 # Must match .pre-commit-config.yaml
Expand All @@ -25,6 +25,7 @@ dependencies:
- numba
- numpy
- pandas
- pint
- pip
- pseudonetcdf
- pydap
Expand All @@ -41,4 +42,3 @@ dependencies:
- zarr
- pip:
- numbagg
- pint
4 changes: 2 additions & 2 deletions ci/requirements/py38.yml
Expand Up @@ -19,7 +19,7 @@ dependencies:
- hdf5
- hypothesis
- iris
- isort
- isort=4.3.21
- lxml # Optional dep of pydap
- matplotlib
- mypy=0.780 # Must match .pre-commit-config.yaml
Expand All @@ -28,6 +28,7 @@ dependencies:
- numba
- numpy
- pandas
- pint
- pip
- pseudonetcdf
- pydap
Expand All @@ -44,4 +45,3 @@ dependencies:
- zarr
- pip:
- numbagg
- pint
2 changes: 0 additions & 2 deletions doc/api.rst
Expand Up @@ -360,7 +360,6 @@ Computation
DataArray.rolling_exp
DataArray.weighted
DataArray.coarsen
DataArray.dt
DataArray.resample
DataArray.get_axis_num
DataArray.diff
Expand All @@ -369,7 +368,6 @@ Computation
DataArray.differentiate
DataArray.integrate
DataArray.polyfit
DataArray.str
DataArray.map_blocks


Expand Down
9 changes: 5 additions & 4 deletions doc/plotting.rst
Expand Up @@ -743,12 +743,13 @@ This script will plot the air temperature on a map.
air = xr.tutorial.open_dataset("air_temperature").air
ax = plt.axes(projection=ccrs.Orthographic(-80, 35))
air.isel(time=0).plot.contourf(ax=ax, transform=ccrs.PlateCarree())
ax.set_global()
p = air.isel(time=0).plot(
subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"),
transform=ccrs.PlateCarree())
p.axes.set_global()
@savefig plotting_maps_cartopy.png width=100%
ax.coastlines()
p.axes.coastlines()
When faceting on maps, the projection can be transferred to the ``plot``
function using the ``subplot_kws`` keyword. The axes for the subplots created
Expand Down
2 changes: 1 addition & 1 deletion doc/related-projects.rst
Expand Up @@ -76,7 +76,7 @@ Visualization
- `Datashader <https://datashader.org>`_, `geoviews <http://geo.holoviews.org>`_, `holoviews <http://holoviews.org/>`_, : visualization packages for large data.
- `hvplot <https://hvplot.pyviz.org/>`_ : A high-level plotting API for the PyData ecosystem built on HoloViews.
- `psyplot <https://psyplot.readthedocs.io>`_: Interactive data visualization with python.
- `xarray-leaflet <https://github.com/davidbrochart/xarray_leaflet>`_: An xarray extension for tiles map plotting based on ipyleaflet.
- `xarray-leaflet <https://github.com/davidbrochart/xarray_leaflet>`_: An xarray extension for tiled map plotting based on ipyleaflet.

Non-Python projects
~~~~~~~~~~~~~~~~~~~
Expand Down
110 changes: 83 additions & 27 deletions doc/whats-new.rst
Expand Up @@ -14,14 +14,58 @@ What's New
np.random.seed(123456)
.. _whats-new.0.16.1:

v0.16.1 (unreleased)
---------------------

Breaking changes
~~~~~~~~~~~~~~~~


New Features
~~~~~~~~~~~~


Bug fixes
~~~~~~~~~


Documentation
~~~~~~~~~~~~~


Internal Changes
~~~~~~~~~~~~~~~~


.. _whats-new.0.16.0:

v0.16.0 (unreleased)
v0.16.0 (2020-07-11)
---------------------

This release adds `xarray.cov` & `xarray.corr` for covariance & correlation
respectively; the `idxmax` & `idxmin` methods, the `polyfit` method &
`xarray.polyval` for fitting polynomials, as well as a number of documentation
improvements, other features, and bug fixes. Many thanks to all 44 contributors
who contributed to this release:

Akio Taniguchi, Andrew Williams, Aurélien Ponte, Benoit Bovy, Dave Cole, David
Brochart, Deepak Cherian, Elliott Sales de Andrade, Etienne Combrisson, Hossein
Madadi, Huite, Joe Hamman, Kai Mühlbauer, Keisuke Fujii, Maik Riechert, Marek
Jacob, Mathias Hauser, Matthieu Ancellin, Maximilian Roos, Noah D Brenowitz,
Oriol Abril, Pascal Bourgault, Phillip Butcher, Prajjwal Nijhara, Ray Bell, Ryan
Abernathey, Ryan May, Spencer Clark, Spencer Hill, Srijan Saurav, Stephan Hoyer,
Taher Chegini, Todd, Tom Nicholas, Yohai Bar Sinai, Yunus Sevinchan,
arabidopsis, aurghs, clausmichele, dmey, johnomotani, keewis, raphael dussin,
risebell

Breaking changes
~~~~~~~~~~~~~~~~

- Minimum supported versions for the following packages have changed: ``dask >=2.9``,
``distributed>=2.9``.
By `Deepak Cherian <https://github.com/dcherian>`_
- ``groupby`` operations will restore coord dimension order. Pass ``restore_coord_dims=False``
to revert to previous behavior.
- :meth:`DataArray.transpose` will now transpose coordinates by default.
Expand All @@ -43,15 +87,6 @@ Breaking changes
default (:issue:`4176`)
By `Stephan Hoyer <https://github.com/shoyer>`_.

Enhancements
~~~~~~~~~~~~
- Performance improvement of :py:meth:`DataArray.interp` and :py:func:`Dataset.interp`
For orthogonal linear- and nearest-neighbor interpolation, we do 1d-interpolation sequentially
rather than interpolating in multidimensional space. (:issue:`2223`)
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
- :py:meth:`DataArray.reset_index` and :py:meth:`Dataset.reset_index` now keep
coordinate attributes (:pull:`4103`). By `Oriol Abril <https://github.com/OriolAbril>`_.

New Features
~~~~~~~~~~~~
- :py:meth:`DataArray.argmin` and :py:meth:`DataArray.argmax` now support
Expand All @@ -61,15 +96,19 @@ New Features
(:pull:`3936`)
By `John Omotani <https://github.com/johnomotani>`_, thanks to `Keisuke Fujii
<https://github.com/fujiisoup>`_ for work in :pull:`1469`.
- Added :py:func:`xarray.cov` and :py:func:`xarray.corr` (:issue:`3784`, :pull:`3550`, :pull:`4089`).
By `Andrew Williams <https://github.com/AndrewWilliams3142>`_ and `Robin Beer <https://github.com/r-beer>`_.
- Implement :py:meth:`DataArray.idxmax`, :py:meth:`DataArray.idxmin`,
:py:meth:`Dataset.idxmax`, :py:meth:`Dataset.idxmin`. (:issue:`60`, :pull:`3871`)
By `Todd Jennings <https://github.com/toddrjen>`_
- Added :py:meth:`DataArray.polyfit` and :py:func:`xarray.polyval` for fitting
polynomials. (:issue:`3349`, :pull:`3733`, :pull:`4099`)
By `Pascal Bourgault <https://github.com/aulemahal>`_.
- Added :py:meth:`xarray.infer_freq` for extending frequency inferring to CFTime indexes and data (:pull:`4033`).
By `Pascal Bourgault <https://github.com/aulemahal>`_.
- ``chunks='auto'`` is now supported in the ``chunks`` argument of
:py:meth:`Dataset.chunk`. (:issue:`4055`)
By `Andrew Williams <https://github.com/AndrewWilliams3142>`_
- Added :py:func:`xarray.cov` and :py:func:`xarray.corr` (:issue:`3784`, :pull:`3550`, :pull:`4089`).
By `Andrew Williams <https://github.com/AndrewWilliams3142>`_ and `Robin Beer <https://github.com/r-beer>`_.
- Added :py:meth:`DataArray.polyfit` and :py:func:`xarray.polyval` for fitting polynomials. (:issue:`3349`, :pull:`3733`, :pull:`4099`)
By `Pascal Bourgault <https://github.com/aulemahal>`_.
- Control over attributes of result in :py:func:`merge`, :py:func:`concat`,
:py:func:`combine_by_coords` and :py:func:`combine_nested` using
combine_attrs keyword argument. (:issue:`3865`, :pull:`3877`)
Expand All @@ -79,19 +118,10 @@ New Features
the exception when a dimension passed to ``isel`` is not present with a
warning, or just ignore the dimension. (:issue:`3866`, :pull:`3923`)
By `John Omotani <https://github.com/johnomotani>`_
- Limited the length of array items with long string reprs to a
reasonable width (:pull:`3900`)
By `Maximilian Roos <https://github.com/max-sixty>`_
- Limited the number of lines of large arrays when numpy reprs would have greater than 40.
(:pull:`3905`)
By `Maximilian Roos <https://github.com/max-sixty>`_
- Implement :py:meth:`DataArray.idxmax`, :py:meth:`DataArray.idxmin`,
:py:meth:`Dataset.idxmax`, :py:meth:`Dataset.idxmin`. (:issue:`60`, :pull:`3871`)
By `Todd Jennings <https://github.com/toddrjen>`_
- Support dask handling for :py:meth:`DataArray.idxmax`, :py:meth:`DataArray.idxmin`,
:py:meth:`Dataset.idxmax`, :py:meth:`Dataset.idxmin`. (:pull:`3922`, :pull:`4135`)
By `Kai Mühlbauer <https://github.com/kmuehlbauer>`_ and `Pascal Bourgault <https://github.com/aulemahal>`_.
- More support for unit aware arrays with pint (:pull:`3643`, :pull:`3975`)
- More support for unit aware arrays with pint (:pull:`3643`, :pull:`3975`, :pull:`4163`)
By `Justus Magin <https://github.com/keewis>`_.
- Support overriding existing variables in ``to_zarr()`` with ``mode='a'`` even
without ``append_dim``, as long as dimension sizes do not change.
Expand Down Expand Up @@ -119,7 +149,30 @@ New Features
(:py:func:`xarray.open_dataarray`, :py:func:`xarray.open_dataarray`,
:py:func:`xarray.decode_cf`) that allows to disable/enable the decoding of timedeltas
independently of time decoding (:issue:`1621`)
`Aureliana Barghini <https://github.com/aurghs>`
`Aureliana Barghini <https://github.com/aurghs>`_

Enhancements
~~~~~~~~~~~~
- Performance improvement of :py:meth:`DataArray.interp` and :py:func:`Dataset.interp`
For orthogonal linear- and nearest-neighbor interpolation, we do 1d-interpolation sequentially
rather than interpolating in multidimensional space. (:issue:`2223`)
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
- Major performance improvement for :py:meth:`Dataset.from_dataframe` when the
dataframe has a MultiIndex (:pull:`4184`).
By `Stephan Hoyer <https://github.com/shoyer>`_.
- :py:meth:`DataArray.reset_index` and :py:meth:`Dataset.reset_index` now keep
coordinate attributes (:pull:`4103`). By `Oriol Abril <https://github.com/OriolAbril>`_.
- Axes kwargs such as ``facecolor`` can now be passed to :py:meth:`DataArray.plot` in ``subplot_kws``.
This works for both single axes plots and FacetGrid plots.
By `Raphael Dussin <https://github.com/raphaeldussin>`_.
- Array items with long string reprs are now limited to a
reasonable width (:pull:`3900`)
By `Maximilian Roos <https://github.com/max-sixty>`_
- Large arrays whose numpy reprs would have greater than 40 lines are now
limited to a reasonable length.
(:pull:`3905`)
By `Maximilian Roos <https://github.com/max-sixty>`_


Bug fixes
~~~~~~~~~
Expand All @@ -133,8 +186,9 @@ Bug fixes
By `Deepak Cherian <https://github.com/dcherian>`_.
- ``ValueError`` is raised when ``fill_value`` is not a scalar in :py:meth:`full_like`. (:issue:`3977`)
By `Huite Bootsma <https://github.com/huite>`_.
- Fix wrong order in converting a ``pd.Series`` with a MultiIndex to ``DataArray``. (:issue:`3951`)
By `Keisuke Fujii <https://github.com/fujiisoup>`_.
- Fix wrong order in converting a ``pd.Series`` with a MultiIndex to ``DataArray``.
(:issue:`3951`, :issue:`4186`)
By `Keisuke Fujii <https://github.com/fujiisoup>`_ and `Stephan Hoyer <https://github.com/shoyer>`_.
- Fix renaming of coords when one or more stacked coords is not in
sorted order during stack+groupby+apply operations. (:issue:`3287`,
:pull:`3906`) By `Spencer Hill <https://github.com/spencerahill>`_
Expand Down Expand Up @@ -167,6 +221,8 @@ Bug fixes
By `Mathias Hauser <https://github.com/mathause>`_.
- Fix html repr in untrusted notebooks: fallback to plain text repr. (:pull:`4053`)
By `Benoit Bovy <https://github.com/benbovy>`_.
- Fix :py:meth:`DataArray.to_unstacked_dataset` for single-dimension variables. (:issue:`4049`)
By `Deepak Cherian <https://github.com/dcherian>`_
- Fix :py:func:`open_rasterio` for ``WarpedVRT`` with specified ``src_crs``. (:pull:`4104`)
By `Dave Cole <https://github.com/dtpc>`_.

Expand Down

0 comments on commit 2b39154

Please sign in to comment.