From d56650dc2fe76e0e84c6be1a9e6b1ae045f51921 Mon Sep 17 00:00:00 2001 From: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:56:52 +0100 Subject: [PATCH] Numpy rounding fix (#3758) ensure rounding is numpy like (maintains type) --- lib/iris/fileformats/pp_load_rules.py | 2 +- requirements/core.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/iris/fileformats/pp_load_rules.py b/lib/iris/fileformats/pp_load_rules.py index c0a4081970..b6aacb382f 100644 --- a/lib/iris/fileformats/pp_load_rules.py +++ b/lib/iris/fileformats/pp_load_rules.py @@ -627,7 +627,7 @@ def _convert_time_coords( def date2hours(t): epoch_hours = _epoch_date_hours(epoch_hours_unit, t) if t.minute == 0 and t.second == 0: - epoch_hours = round(epoch_hours) + epoch_hours = np.around(epoch_hours) return epoch_hours def date2year(t_in): diff --git a/requirements/core.txt b/requirements/core.txt index 50640751cd..56544d1926 100644 --- a/requirements/core.txt +++ b/requirements/core.txt @@ -8,7 +8,7 @@ cartopy>=0.12 cf-units>=2 cftime dask[array]>=2 #conda: dask>=2 -matplotlib +matplotlib<3.3 netcdf4 numpy>=1.14 scipy