Skip to content

Commit

Permalink
Update CI environment lockfiles (#4137)
Browse files Browse the repository at this point in the history
* Updated environment lockfiles

* Fix add_weekday. (#4169)

Co-authored-by: Lockfile bot <noreply@github.com>
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 2, 2021
1 parent ca4c0d9 commit 83cc580
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 114 deletions.
10 changes: 4 additions & 6 deletions lib/iris/coord_categorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def vectorised_fn(*args):
# Private "helper" function
def _pt_date(coord, time):
"""
Return the date of a time-coordinate point.
Return the datetime of a time-coordinate point.
Args:
Expand All @@ -103,14 +103,12 @@ def _pt_date(coord, time):
value of a coordinate point
Returns:
datetime.date
cftime.datetime
"""
# NOTE: All of the currently defined categorisation functions are
# calendar operations on Time coordinates.
# - All these currently depend on Unit::num2date, which is deprecated (!!)
# - We will want to do better, when we sort out our own Calendars.
# - For now, just make sure these all call through this one function.
return coord.units.num2date(time)
return coord.units.num2date(time, only_use_cftime_datetimes=True)


# --------------------------------------------
Expand Down
Loading

0 comments on commit 83cc580

Please sign in to comment.