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

Skip to content

Commit ab4098e

Browse files
committed
pep8 sklearn/utils/__init__.py
1 parent 71953c4 commit ab4098e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sklearn/utils/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import scipy.sparse as sp
33
import warnings
44

5+
56
def assert_all_finite(X):
67
"""Throw a ValueError if X contains NaN or infinity.
78
Input MUST be an np.ndarray instance or a scipy.sparse matrix."""
@@ -22,12 +23,11 @@ def safe_asanyarray(X, dtype=None, order=None):
2223

2324

2425
def as_float_array(X, overwrite_X=False):
25-
"""
26-
Converts a numpy array to type np.float
26+
"""Converts a numpy array to an array of floats
2727
28-
The new dtype will be float32 or np.float64, depending on the original type.
29-
The function can create a copy or modify the argument depending
30-
of the argument overwrite_X
28+
The new dtype will be np.float32 or np.float64, depending on the original
29+
type. The function can create a copy or modify the argument depending
30+
on the argument overwrite_X.
3131
3232
WARNING : If X is not of type float, then a copy of X with the right type
3333
will be returned
@@ -198,6 +198,7 @@ def _decorate_class(self, cls):
198198

199199
# FIXME: we should probably reset __new__ for full generality
200200
init = cls.__init__
201+
201202
def wrapped(*args, **kwargs):
202203
warnings.warn(msg, category=DeprecationWarning)
203204
return init(*args, **kwargs)

0 commit comments

Comments
 (0)