Skip to content

Commit

Permalink
Test zero within region inequality
Browse files Browse the repository at this point in the history
  • Loading branch information
sjsrey committed Jan 16, 2025
1 parent f583126 commit 8eceda2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inequality/tests/test_theil.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def test___init__(self):
]
),
)
y = numpy.array([0,0,0,10,10,10])
regions = numpy.array([0,0,0,1,1,1])
theil_d = TheilD(y, regions)
numpy.testing.assert_almost_equal(theil_d.T, 0.6931471805599453)
numpy.testing.assert_almost_equal(theil_d.bg, 0.6931471805599453)
numpy.testing.assert_almost_equal(theil_d.wg, 0)


class TestTheilDSim:
Expand Down

0 comments on commit 8eceda2

Please sign in to comment.