Skip to content

Commit

Permalink
User warning where num_levels mismatched
Browse files Browse the repository at this point in the history
  • Loading branch information
samnlindsay committed Jul 7, 2020
1 parent d54a532 commit 98b0949
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion splink/params.py
Expand Up @@ -21,6 +21,7 @@
)
from .check_types import check_types
import random
import warnings

altair_installed = True
try:
Expand Down Expand Up @@ -621,6 +622,6 @@ def get_or_update_settings(params: Params, settings: dict = None):
comp["m_probabilities"] = m_probs
comp["u_probabilities"] = u_probs
else:
print(f"{label}: Saved m and u probabilities do not match the specified number of levels ({num_levels}) - default probabilities will be used")
warnings.warn(f"{label}: Saved m and u probabilities do not match the specified number of levels ({num_levels}) - default probabilities will be used")

return(settings)

0 comments on commit 98b0949

Please sign in to comment.