Skip to content

Commit

Permalink
don't hardcode avg
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Jul 10, 2017
1 parent d2fde0e commit 37cc3c1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/fpylll/algorithms/bkz_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,9 @@ def __radd__(self, other):

def __sub__(self, other):
"""
Return the difference of the averages.
Return the difference of the two nodes reduced to floats.
"""
if not isinstance(other, Statistic):
return self.avg - other
else:
return self.avg - other.avg
return float(self) - float(other)

def __float__(self):
"""
Expand Down

0 comments on commit 37cc3c1

Please sign in to comment.