Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-schmitt committed Oct 1, 2024
1 parent 48d7551 commit 98abb47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oggm/utils/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,10 @@ def floatyear_to_date(yr):
if isinstance(yr, (int, float)):
yr = np.array([yr], dtype=np.float64)

if ((isinstance(yr, np.ndarray) or
isinstance(yr, np.generic)) and yr.size == 1):
yr = np.array([yr], dtype=np.float64)

# check if year is inside machine precision to next higher int
yr_ceil = np.ceil(yr)
yr = np.where(np.isclose(yr,
Expand Down

0 comments on commit 98abb47

Please sign in to comment.