diff --git a/src/jimgw/single_event/likelihood.py b/src/jimgw/single_event/likelihood.py index d519d5cb..6f2a2361 100644 --- a/src/jimgw/single_event/likelihood.py +++ b/src/jimgw/single_event/likelihood.py @@ -559,7 +559,7 @@ def y(x): rng_key, optimized_positions, summary = optimizer.optimize( jax.random.PRNGKey(12094), y, initial_position ) - best_fit = optimized_positions[summary["final_log_prob"].argmin()] + best_fit = optimized_positions[jnp.nanargmin(summary["final_log_prob"])] return prior.transform(prior.add_name(best_fit))