diff --git a/inequality/theil.py b/inequality/theil.py index b4bb6048..44933dbd 100644 --- a/inequality/theil.py +++ b/inequality/theil.py @@ -159,9 +159,7 @@ def __init__(self, y, partition, column=None, partition_col=None): ng.shape = (ng.size,) # ensure ng is 1-d # Between group inequality sg = sg + (sg == 0) # handle case when a partition has 0 for sum - bg = np.multiply(sg, - np.log(np.dot(np.diag(len(y) * 1.0 / ng), - sg))).sum(axis=0) + bg = np.multiply(sg, np.log(np.dot(np.diag(len(y) * 1.0 / ng), sg))).sum(axis=0) self.T = t self.bg = bg