ddl.utils.make_finite

ddl.utils.make_finite(X)[source]

Make the data matrix finite by replacing -infty and infty.

Parameters:
X : array-like, shape (n_samples, n_features)

Data matrix.

Returns:
X : array, shape (n_samples, n_features)

Data matrix as numpy array after checking and possibly replacing -infty and infty with min and max of floating values respectively.