fix few small things

This commit is contained in:
relikd
2021-02-13 22:24:17 +01:00
parent e4b4ed4498
commit 8ae643126e
3 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ class Probability(object):
self.prob = [0] * 29
for r in numstream:
self.prob[r] += 1
self.N = len(numstream)
self.N = sum(self.prob)
def IC(self):
X = sum(x * (x - 1) for x in self.prob)

View File

@@ -92,7 +92,7 @@ class RuneText(object):
def __invert__(self):
return RuneText([~x for x in self._data])
def __str__(self):
def __repr__(self):
return f'RuneText<{len(self)}>'
@property