Skip to content

Commit

Permalink
Update _stats.py
Browse files Browse the repository at this point in the history
Signed-off-by: Zishen Wang <[email protected]>
  • Loading branch information
zz11ss11zz authored Sep 21, 2024
1 parent 936e4a4 commit ec39f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/maml/utils/_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ec39f56

Please sign in to comment.