Skip to content

Commit a6b1b23

Browse files
authored
fix: handle edge case of DCR share being 0 (#191)
1 parent 45fcfe9 commit a6b1b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mostlyai/qa/_distances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def calculate_distances(
116116
else:
117117
suffix = f"{len(columns)} columns [{columns}]"
118118
_LOG.info(f"DCR Share: {g_dcr_share:.1%}, NNDR Ratio: {g_nndr_ratio:.3f} - {suffix}")
119-
if g_dcr_share > dcr_share:
119+
if g_dcr_share >= dcr_share:
120120
# keep results if DCR share is MAX
121121
dcr_share = g_dcr_share
122122
nndr_ratio = g_nndr_ratio

0 commit comments

Comments
 (0)