From ca3aae9fc04888b3fa0d4e489e66ff9b556a2111 Mon Sep 17 00:00:00 2001 From: forestbat Date: Wed, 22 May 2024 19:07:45 +0800 Subject: [PATCH] Update hydro_stat.py to revert mistake --- hydroutils/hydro_stat.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hydroutils/hydro_stat.py b/hydroutils/hydro_stat.py index 117c70c..da1a2ae 100644 --- a/hydroutils/hydro_stat.py +++ b/hydroutils/hydro_stat.py @@ -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