Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git:

install:
- >
export IRIS_TEST_DATA_REF="2f3a6bcf25f81bd152b3d66223394074c9069a96";
export IRIS_TEST_DATA_REF="dba47566a9147645fea586f94a138e0a8d45a48e";
export IRIS_TEST_DATA_SUFFIX=$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//");

# Cut short doctest phase under Python 2 : now only supports Python 3
Expand Down
4 changes: 3 additions & 1 deletion docs/iris/src/sphinxext/custom_class_autodoc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) British Crown Copyright 2010 - 2015, Met Office
# (C) British Crown Copyright 2010 - 2019, Met Office
#
# This file is part of Iris.
#
Expand All @@ -20,6 +20,8 @@

from sphinx.ext import autodoc
from sphinx.ext.autodoc import *
from sphinx.util import force_decode
from sphinx.util.docstrings import prepare_docstring

import inspect

Expand Down
4 changes: 0 additions & 4 deletions docs/iris/src/userguide/cube_statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ For an example of using this functionality, the
in the gallery takes a zonal mean of an ``XYT`` cube by using the
``collapsed`` method with ``latitude`` and ``iris.analysis.MEAN`` as arguments.

You cannot partially collapse a multi-dimensional coordinate. See
:ref:`cube.collapsed <partially_collapse_multi-dim_coord>` for more
information.

.. _cube-statistics-collapsing-average:

Area averaging
Expand Down
16 changes: 16 additions & 0 deletions docs/iris/src/whatsnew/2.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Iris 2.2 Features
discontiguous points in coordinates can be explicitly masked
using another new feature :func:`iris.util.mask_cube`.

* :func:`iris.util.array_equal` now has a 'withnans' keyword, which provides
a NaN-tolerant array comparison.


Iris 2.2 Dependency updates
=============================
Expand All @@ -89,8 +92,21 @@ Bugs Fixed
* "Gracefully filling..." warnings are now only issued when the coordinate or
bound data is actually masked.


Bugs fixed in v2.2.1
--------------------

* Iris can now correctly unpack a column of header objects when saving a
pandas DataFrame to a cube.

* fixed a bug in :meth:`iris.util.new_axis` : copying the resulting cube
resulted in an exception, if it contained an aux-factory.

* :class:`iris.coords.AuxCoord`'s can now test as 'equal' even when the points
or bounds arrays contain NaN values, if values are the same at all points.
Previously this would fail, as conventionally "NaN != NaN" in normal
floating-point arithmetic.



Documentation Changes
Expand Down
4 changes: 3 additions & 1 deletion lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,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
1 change: 1 addition & 0 deletions lib/iris/analysis/cartography.py
Original file line number Diff line number Diff line change
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: 5 additions & 3 deletions lib/iris/coords.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 @@ -817,11 +817,13 @@ def __eq__(self, other):
eq = self._as_defn() == other._as_defn()
# points comparison
if eq:
eq = iris.util.array_equal(self.points, other.points)
eq = iris.util.array_equal(self.points, other.points,
withnans=True)
# bounds comparison
if eq:
if self.has_bounds() and other.has_bounds():
eq = iris.util.array_equal(self.bounds, other.bounds)
eq = iris.util.array_equal(self.bounds, other.bounds,
withnans=True)
else:
eq = self.bounds is None and other.bounds is None

Expand Down
Loading