Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30070c9

Browse files
author
Fabian Pedregosa
committed
FIX: assign NaN to an integer array has no effect on old numpy
1 parent 9c3f807 commit 30070c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/linear_model/tests/test_logistic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ def test_nan():
6969
7070
Regression test for Issue #252: fit used to go into an infinite loop.
7171
"""
72-
Xnan = np.array(X)
72+
Xnan = np.array(X, dtype=np.float64)
7373
Xnan[0, 1] = np.nan
74-
logistic.LogisticRegression().fit(X, Y1)
74+
logistic.LogisticRegression().fit(Xnan, Y1)
7575

7676

7777
def test_transform():

0 commit comments

Comments
 (0)