Skip to content

Commit

Permalink
Numpy rounding fix (#3758)
Browse files Browse the repository at this point in the history
ensure rounding is numpy like (maintains type)
  • Loading branch information
stephenworsley authored and bjlittle committed Aug 5, 2020
1 parent 7a74615 commit d56650d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/iris/fileformats/pp_load_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion requirements/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d56650d

Please sign in to comment.