You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/tests_measures/test_measures_effect_size.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,7 @@ def test_log_ratio():
156
156
numpy.array([0, 0, 0]),
157
157
numpy.array([1, 1, 0])
158
158
),
159
-
numpy.array([float('-inf'), float('inf'), 0])
159
+
numpy.array([-math.inf, math.inf, 0])
160
160
)
161
161
162
162
deftest_mi_log_f():
@@ -246,7 +246,7 @@ def test_odds_ratio():
246
246
numpy.array([0, 0, 0]),
247
247
numpy.array([1, 1, 0])
248
248
),
249
-
numpy.array([float('-inf'), float('inf'), 0])
249
+
numpy.array([-math.inf, math.inf, 0])
250
250
)
251
251
252
252
# Reference: Gabrielatos, C., & Marchi, A. (2011, November 5). Keyness: Matching metrics to definitions [Conference session]. Corpus Linguistics in the South 1, University of Portsmouth, United Kingdom. https://eprints.lancs.ac.uk/id/eprint/51449/4/Gabrielatos_Marchi_Keyness.pdf | p. 18
@@ -270,7 +270,7 @@ def test_pct_diff():
270
270
numpy.array([0, 0, 0]),
271
271
numpy.array([1, 1, 0])
272
272
),
273
-
numpy.array([float('-inf'), float('inf'), 0])
273
+
numpy.array([-math.inf, math.inf, 0])
274
274
)
275
275
276
276
# Reference: Church, K. W., & Hanks, P. (1990). Word association norms, mutual information, and lexicography. Computational Linguistics, 16(1), 22–29. | p. 24
0 commit comments