Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aed53bf

Browse filesBrowse files
author
Fabian Pedregosa
committed
FIX: assign NaN to an integer array has no effect on old numpy
1 parent a3af07a commit aed53bf
Copy full SHA for aed53bf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎sklearn/linear_model/tests/test_logistic.py

Copy file name to clipboardExpand all lines: sklearn/linear_model/tests/test_logistic.py
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.