Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bouweandela committed Aug 8, 2024
1 parent f800102 commit 4c1d2c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def _dotv(version):
# See https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
intersphinx_mapping = {
"cartopy": ("https://scitools.org.uk/cartopy/docs/latest/", None),
"cftime": ("https://unidata.github.io/cftime/", None),
"dask": ("https://docs.dask.org/en/stable/", None),
"iris-esmf-regrid": ("https://iris-esmf-regrid.readthedocs.io/en/stable/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
Expand Down
6 changes: 2 additions & 4 deletions lib/iris/coord_categorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_categorised_coord(
category_function : callable
Function(coordinate, value), returning a category value for a coordinate
point-value. If ``value`` has a type hint :obj:`cftime.datetime`, the
coordinate points are translated to :obj:`cftime.datetime`s before
coordinate points are translated to :obj:`cftime.datetime` s before
calling ``category_function``.
units : str, default="1"
Units of the category value, typically 'no_unit' or '1'.
Expand Down Expand Up @@ -434,8 +434,6 @@ def add_season_membership(cube, coord, season, name="season_membership"):
months = _months_in_season(season)

def _season_membership(_, value: cftime.datetime) -> bool:
if value.month in months:
return True
return False
return value.month in months

add_categorised_coord(cube, name, coord, _season_membership)

0 comments on commit 4c1d2c5

Please sign in to comment.