Skip to content
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

Mergeback master to 2.2.x #3273

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2018, Met Office
# (C) British Crown Copyright 2010 - 2019, Met Office
#
# This file is part of Iris.
#
Expand Down Expand Up @@ -1324,7 +1324,9 @@ def interp_order(length):

# Collapse array to its final data shape.
slices = [slice(None)] * array.ndim
slices[-1] = 0
endslice = slice(0, 1) if len(slices) == 1 else 0
slices[-1] = endslice
slices = tuple(slices) # Numpy>=1.16 : index with tuple, *not* list.

if isinstance(array.dtype, np.float):
data = array[slices]
Expand Down
3 changes: 2 additions & 1 deletion lib/iris/analysis/cartography.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2018, Met Office
# (C) British Crown Copyright 2010 - 2019, Met Office
#
# This file is part of Iris.
#
Expand Down Expand Up @@ -717,6 +717,7 @@ def project(cube, target_proj, nx=None, ny=None):
index = list(index)
index[xdim] = slice(None, None)
index[ydim] = slice(None, None)
index = tuple(index) # Numpy>=1.16 : index with tuple, *not* list.
new_data[index] = cartopy.img_transform.regrid(ll_slice.data,
source_x, source_y,
source_cs,
Expand Down
8 changes: 4 additions & 4 deletions lib/iris/tests/test_merge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2017, Met Office
# (C) British Crown Copyright 2010 - 2019, Met Office
#
# This file is part of Iris.
#
Expand Down Expand Up @@ -197,16 +197,16 @@ def test__ndarray_ndarray(self):
def test__masked_masked(self):
for (lazy0, lazy1), (fill0, fill1) in self.combos:
cubes = iris.cube.CubeList()
mask = [(0,), (0,)]
mask = ((0,), (0,))
cubes.append(self._make_cube(0, mask=mask, lazy=lazy0,
dtype=self.dtype,
fill_value=fill0))
mask = [(1,), (1,)]
mask = ((1,), (1,))
cubes.append(self._make_cube(1, mask=mask, lazy=lazy1,
dtype=self.dtype,
fill_value=fill1))
result = cubes.merge_cube()
mask = [(0, 1), (0, 1), (0, 1)]
mask = ((0, 1), (0, 1), (0, 1))
expected_fill_value = self._expected_fill_value(fill0, fill1)
expected = self._make_data([0, 1], mask=mask, dtype=self.dtype,
fill_value=expected_fill_value)
Expand Down
2 changes: 1 addition & 1 deletion requirements/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

cartopy
#conda: proj4<5
cf_units>=2
cf-units>=2
cftime==1.0.1
dask[array] #conda: dask
matplotlib>=2,<3
Expand Down