inplace_row_scale
- sklearn.utils.sparsefuncs.inplace_row_scale(X, scale)
Inplace row scaling of a CSR or CSC matrix.
Scale each row of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape.
- Parameters:
- X : sparse matrix of shape (n_samples, n_features)
Matrix to be scaled. It should be of CSR or CSC format.
- scale : ndarray of shape (n_features,), dtype={np.float32, np.float64}