From 55fbacad4f25c1d94f8743db5ddf5d25aa3b61e5 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 31 Mar 2023 13:40:33 +0100 Subject: [PATCH 1/3] raise dask min pin --- requirements/py310.yml | 2 +- requirements/py38.yml | 2 +- requirements/py39.yml | 2 +- setup.cfg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/py310.yml b/requirements/py310.yml index e3bada6596..49b8ae78ab 100644 --- a/requirements/py310.yml +++ b/requirements/py310.yml @@ -14,7 +14,7 @@ dependencies: - cartopy >=0.21 - cf-units >=3.1 - cftime >=1.5 - - dask-core >=2.26 + - dask-core >=2022.9.0 - matplotlib >=3.5 - netcdf4 - numpy >=1.19 diff --git a/requirements/py38.yml b/requirements/py38.yml index 9393060113..1e3c61f369 100644 --- a/requirements/py38.yml +++ b/requirements/py38.yml @@ -14,7 +14,7 @@ dependencies: - cartopy >=0.21 - cf-units >=3.1 - cftime >=1.5 - - dask-core >=2.26 + - dask-core >=2022.9.0 - matplotlib >=3.5 - netcdf4 - numpy >=1.19 diff --git a/requirements/py39.yml b/requirements/py39.yml index 349784ec46..6551eee495 100644 --- a/requirements/py39.yml +++ b/requirements/py39.yml @@ -14,7 +14,7 @@ dependencies: - cartopy >=0.21 - cf-units >=3.1 - cftime >=1.5 - - dask-core >=2.26 + - dask-core >=2022.9.0 - matplotlib >=3.5 - netcdf4 - numpy >=1.19 diff --git a/setup.cfg b/setup.cfg index ba9844f5d8..aac726776c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,7 +50,7 @@ install_requires = cartopy>=0.21 cf-units>=3.1 cftime>=1.5.0 - dask[array]>=2.26 + dask[array]>=2022.9.0 matplotlib>=3.5 netcdf4 numpy>=1.19 From 71010765044729f5de89b51d0668cdfc9447f3e4 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 31 Mar 2023 15:27:27 +0100 Subject: [PATCH 2/3] replace workaround --- lib/iris/analysis/cartography.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/iris/analysis/cartography.py b/lib/iris/analysis/cartography.py index fffb11f295..5b11495d5a 100644 --- a/lib/iris/analysis/cartography.py +++ b/lib/iris/analysis/cartography.py @@ -1244,12 +1244,8 @@ def rotate_winds(u_cube, v_cube, target_cs): if apply_mask: # Make masked arrays to accept masking. if lazy_output: - ut_cube = ut_cube.copy( - data=da.ma.masked_array(ut_cube.core_data()) - ) - vt_cube = vt_cube.copy( - data=da.ma.masked_array(vt_cube.core_data()) - ) + ut_cube = ut_cube.copy(data=da.ma.empty_like(ut_cube.core_data())) + vt_cube = vt_cube.copy(data=da.ma.empty_like(vt_cube.core_data())) else: ut_cube.data = ma.asanyarray(ut_cube.data) vt_cube.data = ma.asanyarray(vt_cube.data) From 06effa34115c99fd11d8e2bc7dbb1e35982e41be Mon Sep 17 00:00:00 2001 From: Bill Little Date: Fri, 31 Mar 2023 16:23:25 +0100 Subject: [PATCH 3/3] add whatsnew entry --- docs/src/whatsnew/latest.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index 16069ddf6d..51adfb9d8d 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -151,6 +151,10 @@ This document explains the changes made to Iris for this release #. `@trexfeathers`_ moved the benchmark runner conveniences from ``noxfile.py`` to a dedicated ``benchmarks/bm_runner.py``. (:pull:`5215`) +#. `@bjlittle`_ follow-up to :pull:`4972`, enforced ``dask>=2022.09.0`` minimum + pin for first use of `dask.array.ma.empty_like`_ and replaced `@tinyendian`_ + workaround. (:pull:`5225`) + .. comment Whatsnew author names (@github name) in alphabetical order. Note that, @@ -167,4 +171,5 @@ This document explains the changes made to Iris for this release Whatsnew resources in alphabetical order: .. _#ShowYourStripes: https://showyourstripes.info/s/globe/ -.. _README.md: https://github.com/SciTools/iris#----- \ No newline at end of file +.. _README.md: https://github.com/SciTools/iris#----- +.. _dask.array.ma.empty_like: https://docs.dask.org/en/stable/generated/dask.array.ma.empty_like.html