Skip to content

Commit

Permalink
Update hydro_stat.py to revert mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
forestbat authored May 22, 2024
1 parent cdc0873 commit ca3aae9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions hydroutils/hydro_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,9 @@ def stat_error(target: np.array, pred: np.array, fill_nan: str = "no") -> dict:
Bias, RMSE, ubRMSE, Corr, R2, NSE, KGE, FHV, FLV
"""
if len(target.shape) == 3:
dict_list = []
'''
assert type(fill_nan) in [list, tuple, np.ndarray]
if type(fill_nan) is not list or len(fill_nan) != target.shape[-1]:
raise RuntimeError("Please give more fill_nan choices")
'''
for k in range(target.shape[0]):
k_dict = stat_error(target[k, :, :], pred[k, :, :], fill_nan=fill_nan)
dict_list.append(k_dict)
return dict_list
if len(target.shape) == 2 and (type(fill_nan) is list or type(fill_nan) is tuple):
fill_nan = fill_nan[0]
assert type(fill_nan) is str
Expand Down

0 comments on commit ca3aae9

Please sign in to comment.