Skip to content

Commit

Permalink
fixed to 3.8 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
OlaRonning committed Feb 27, 2024
1 parent 0c310e7 commit 35e7aab
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions numpyro/contrib/ecs_proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,14 @@ def log_likelihood_sum(params_flat, subsample_indices=None):
for k, v in log_likelihood(params_flat, subsample_indices).items()
}

match degree:
case 2:
TPState = TaylorTwoProxyState
case 1:
TPState = TaylorOneProxyState
case _:
raise ValueError(
"Taylor proxy only defined for first and second degree."
)
if degree == 2:
TPState = TaylorTwoProxyState
elif 1:
TPState = TaylorOneProxyState
else:
raise ValueError(
"Taylor proxy only defined for first and second degree."
)

# those stats are dict keyed by subsample names
ref_sum_log_lik = log_likelihood_sum(ref_params_flat)
Expand Down

0 comments on commit 35e7aab

Please sign in to comment.