From 1e5f6a7bf0803b03329fc071600f3d815878a328 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:00:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- inequality/theil.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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