Skip to content

Commit

Permalink
small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-schmitt committed Aug 29, 2023
1 parent f0546bf commit 7552fc3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions oggm/utils/_funcs.py
Expand Up @@ -619,10 +619,7 @@ def floatyear_to_date(yr):
np.round(month_exact),
np.floor(month_exact)).astype(int))

if isinstance(yr, float):
out_y = out_y.item()
out_m = out_m.item()
elif (isinstance(yr, list) or isinstance(yr, np.ndarray)) and len(yr) == 1:
if (isinstance(yr, list) or isinstance(yr, np.ndarray)) and len(yr) == 1:
out_y = out_y.item()
out_m = out_m.item()
elif isinstance(yr, xr.DataArray):
Expand Down

0 comments on commit 7552fc3

Please sign in to comment.