From ec39f5612dfacc028f4eb7973e4710b3d33c8a79 Mon Sep 17 00:00:00 2001 From: Zishen Wang <64644075+zz11ss11zz@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:49:16 -0700 Subject: [PATCH] Update _stats.py Signed-off-by: Zishen Wang <64644075+zz11ss11zz@users.noreply.github.com> --- src/maml/utils/_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maml/utils/_stats.py b/src/maml/utils/_stats.py index 8a1cd047..224d54c2 100644 --- a/src/maml/utils/_stats.py +++ b/src/maml/utils/_stats.py @@ -367,7 +367,7 @@ def _root_moment(data, weights, order) -> float: if order > 1: mean = np.mean(data) - moment = sum((i - mean) ** order * j for i, j in zip(data, pmf, strict=False)) + moment = sum((i - mean) ** order * j for i, j in zip(data, pmf)) # when order is odd, moment can be negative sign = -1 if moment < 0 else 1 @@ -446,7 +446,7 @@ def get_full_stats_and_funcs(stats: list) -> tuple[list[str], list]: func = getattr(Stats, stat_name) args = splits[1:] arg_dict = {} - for name_dict, arg in zip(STATS_KWARGS[stat_name], args, strict=False): # type: ignore + for name_dict, arg in zip(STATS_KWARGS[stat_name], args): # type: ignore name = next(iter(name_dict.keys())) value_type = next(iter(name_dict.values())) try: