Skip to content

Commit

Permalink
Merge pull request #134 from diffix/paul-divide-by-zero
Browse files Browse the repository at this point in the history
Update solver.py
  • Loading branch information
yoid2000 authored Mar 29, 2024
2 parents 6abe392 + e98374e commit 76f6255
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion syndiffix/clustering/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def _col_weight(entropy: float) -> float:


def _floor_by(n: float, x: float) -> float:
return math.floor(x / n) * n
if n == 0.0:
return 0.0
else:
return math.floor(x / n) * n


def _build_clusters(
Expand Down

0 comments on commit 76f6255

Please sign in to comment.