Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 29, 2024
1 parent aff0c27 commit 1e5f6a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions inequality/theil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e5f6a7

Please sign in to comment.