Skip to content

Commit 2b39154

Browse files
committed
Merge branch 'master' into fix/4107
* 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)
2 parents 2620ad6 + 52043bc commit 2b39154

27 files changed

+1269
-712
lines changed

asv_bench/benchmarks/pandas.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import numpy as np
2+
import pandas as pd
3+
4+
from . import parameterized
5+
6+
7+
class MultiIndexSeries:
8+
def setup(self, dtype, subset):
9+
data = np.random.rand(100000).astype(dtype)
10+
index = pd.MultiIndex.from_product(
11+
[
12+
list("abcdefhijk"),
13+
list("abcdefhijk"),
14+
pd.date_range(start="2000-01-01", periods=1000, freq="B"),
15+
]
16+
)
17+
series = pd.Series(data, index)
18+
if subset:
19+
series = series[::3]
20+
self.series = series
21+
22+
@parameterized(["dtype", "subset"], ([int, float], [True, False]))
23+
def time_to_xarray(self, dtype, subset):
24+
self.series.to_xarray()

ci/requirements/py36-min-all-deps.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@ dependencies:
1515
- cfgrib=0.9
1616
- cftime=1.0
1717
- coveralls
18-
- dask=2.5
19-
- distributed=2.5
18+
- dask=2.9
19+
- distributed=2.9
2020
- flake8
2121
- h5netcdf=0.7
2222
- h5py=2.9 # Policy allows for 2.10, but it's a conflict-fest
2323
- hdf5=1.10
2424
- hypothesis
2525
- iris=2.2
26-
- isort
26+
- isort=4.3.21
2727
- lxml=4.4 # Optional dep of pydap
2828
- matplotlib=3.1
29-
- msgpack-python=0.6 # remove once distributed is bumped. distributed GH3491
3029
- mypy=0.761 # Must match .pre-commit-config.yaml
3130
- nc-time-axis=1.2
3231
- netcdf4=1.4
33-
- numba=0.44
32+
- numba=0.46
3433
- numpy=1.15
3534
- pandas=0.25
3635
# - pint # See py36-min-nep18.yml

ci/requirements/py36-min-nep18.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ dependencies:
66
# require drastically newer packages than everything else
77
- python=3.6
88
- coveralls
9-
- dask=2.5
10-
- distributed=2.5
11-
- msgpack-python=0.6 # remove once distributed is bumped. distributed GH3491
9+
- dask=2.9
10+
- distributed=2.9
1211
- numpy=1.17
1312
- pandas=0.25
13+
- pint=0.13
1414
- pip
1515
- pytest
1616
- pytest-cov
1717
- pytest-env
1818
- scipy=1.2
1919
- setuptools=41.2
2020
- sparse=0.8
21-
- pip:
22-
- pint==0.13

ci/requirements/py36.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- hdf5
2020
- hypothesis
2121
- iris
22-
- isort
22+
- isort=4.3.21
2323
- lxml # Optional dep of pydap
2424
- matplotlib
2525
- mypy=0.761 # Must match .pre-commit-config.yaml
@@ -28,6 +28,7 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31+
- pint
3132
- pip
3233
- pseudonetcdf
3334
- pydap
@@ -44,4 +45,3 @@ dependencies:
4445
- zarr
4546
- pip:
4647
- numbagg
47-
- pint

ci/requirements/py37-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- hdf5
2020
- hypothesis
2121
- iris
22-
- isort
22+
- isort=4.3.21
2323
- lxml # Optional dep of pydap
2424
- matplotlib
2525
- mypy=0.761 # Must match .pre-commit-config.yaml
@@ -28,6 +28,7 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31+
- pint
3132
- pip
3233
- pseudonetcdf
3334
- pydap
@@ -44,4 +45,3 @@ dependencies:
4445
- zarr
4546
- pip:
4647
- numbagg
47-
- pint

ci/requirements/py37.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- hdf5
2020
- hypothesis
2121
- iris
22-
- isort
22+
- isort=4.3.21
2323
- lxml # Optional dep of pydap
2424
- matplotlib
2525
- mypy=0.761 # Must match .pre-commit-config.yaml
@@ -28,6 +28,7 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31+
- pint
3132
- pip
3233
- pseudonetcdf
3334
- pydap
@@ -44,4 +45,3 @@ dependencies:
4445
- zarr
4546
- pip:
4647
- numbagg
47-
- pint

ci/requirements/py38-all-but-dask.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- h5py
1717
- hdf5
1818
- hypothesis
19-
- isort
19+
- isort=4.3.21
2020
- lxml # Optional dep of pydap
2121
- matplotlib
2222
- mypy=0.761 # Must match .pre-commit-config.yaml
@@ -25,6 +25,7 @@ dependencies:
2525
- numba
2626
- numpy
2727
- pandas
28+
- pint
2829
- pip
2930
- pseudonetcdf
3031
- pydap
@@ -41,4 +42,3 @@ dependencies:
4142
- zarr
4243
- pip:
4344
- numbagg
44-
- pint

ci/requirements/py38.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- hdf5
2020
- hypothesis
2121
- iris
22-
- isort
22+
- isort=4.3.21
2323
- lxml # Optional dep of pydap
2424
- matplotlib
2525
- mypy=0.780 # Must match .pre-commit-config.yaml
@@ -28,6 +28,7 @@ dependencies:
2828
- numba
2929
- numpy
3030
- pandas
31+
- pint
3132
- pip
3233
- pseudonetcdf
3334
- pydap
@@ -44,4 +45,3 @@ dependencies:
4445
- zarr
4546
- pip:
4647
- numbagg
47-
- pint

doc/api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ Computation
360360
DataArray.rolling_exp
361361
DataArray.weighted
362362
DataArray.coarsen
363-
DataArray.dt
364363
DataArray.resample
365364
DataArray.get_axis_num
366365
DataArray.diff
@@ -369,7 +368,6 @@ Computation
369368
DataArray.differentiate
370369
DataArray.integrate
371370
DataArray.polyfit
372-
DataArray.str
373371
DataArray.map_blocks
374372

375373

doc/plotting.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -743,12 +743,13 @@ This script will plot the air temperature on a map.
743743
744744
air = xr.tutorial.open_dataset("air_temperature").air
745745
746-
ax = plt.axes(projection=ccrs.Orthographic(-80, 35))
747-
air.isel(time=0).plot.contourf(ax=ax, transform=ccrs.PlateCarree())
748-
ax.set_global()
746+
p = air.isel(time=0).plot(
747+
subplot_kws=dict(projection=ccrs.Orthographic(-80, 35), facecolor="gray"),
748+
transform=ccrs.PlateCarree())
749+
p.axes.set_global()
749750
750751
@savefig plotting_maps_cartopy.png width=100%
751-
ax.coastlines()
752+
p.axes.coastlines()
752753
753754
When faceting on maps, the projection can be transferred to the ``plot``
754755
function using the ``subplot_kws`` keyword. The axes for the subplots created

0 commit comments

Comments
 (0)