diff --git a/docs/iris/src/whatsnew/contributions_3.0.0/docchange_2020-Apr-03_extract_clarification.txt b/docs/iris/src/whatsnew/contributions_3.0.0/docchange_2020-Apr-03_extract_clarification.txt new file mode 100644 index 0000000000..48e2a99e57 --- /dev/null +++ b/docs/iris/src/whatsnew/contributions_3.0.0/docchange_2020-Apr-03_extract_clarification.txt @@ -0,0 +1 @@ +* Updated the documentation for the :meth:`iris.cube.CubeList.extract` method, to specify when a single cube, as opposed to a CubeList, may be returned. diff --git a/lib/iris/cube.py b/lib/iris/cube.py index 0fc381725d..fec68c575c 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -282,7 +282,8 @@ def extract(self, constraints, strict=False): * strict - boolean If strict is True, then there must be exactly one cube which is - filtered per constraint. + filtered per constraint. Note: if a single constraint is given, a + Cube is returned rather than a CubeList. """ return self._extract_and_merge(