Skip to content

Commit

Permalink
added error message for assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yfukai committed Sep 22, 2021
1 parent d65a4ca commit 10bb1d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/m2stitch/_stage_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ def compute_image_overlap(
return tuple(map(float, model["x"]))
elif model["fun"] < best_model["fun"]:
best_model = model
assert not best_model is None
assert (
not best_model is None
), "Overlap model estimation failed, try raising the value of overlap_prob_uniform_threshold" # noqa :
# best_model_params : Tuple[Float,Float,Float] = tuple(best_model["x"])
assert len(best_model["x"]) == 3
return tuple(map(float, best_model["x"]))
Expand Down

0 comments on commit 10bb1d9

Please sign in to comment.