Skip to content

Commit

Permalink
break one-line to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeAdachi committed Mar 28, 2022
1 parent 291c702 commit c1d9cd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/whylogs/core/summaryconverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,11 @@ def compute_chi_squared_test_p_value(target_distribution: ReferenceDistributionD
chi_sq = 0
for item in target_freq_items.items:
target_frequency = item.estimate
ref_frequency = int(proportion_ref_dist_items[item.json_value] * target_total_count) if item.json_value in ref_dist_items else 0
if item.json_value in ref_dist_items:
ref_frequency = int(proportion_ref_dist_items[item.json_value] * target_total_count)
else:
ref_frequency = 0

if ref_frequency == 0:
chi_sq = np.inf
break
Expand Down

0 comments on commit c1d9cd1

Please sign in to comment.