We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5029db7 commit 6a3365dCopy full SHA for 6a3365d
sklearn/preprocessing/imputation.py
@@ -356,7 +356,8 @@ def transform(self, X):
356
indexes = np.repeat(np.arange(len(X.indptr) - 1, dtype=np.int),
357
np.diff(X.indptr))[mask]
358
359
- X.data[mask] = valid_statistics[indexes].astype(X.dtype)
+ X.data[mask] = astype(valid_statistics[indexes], X.dtype,
360
+ copy=False)
361
else:
362
if sparse.issparse(X):
363
X = X.toarray()
0 commit comments