sklearn.utils.sparsefuncs
.inplace_swap_column¶
-
sklearn.utils.sparsefuncs.
inplace_swap_column
(X, m, n)[source]¶ Swaps two columns of a CSC/CSR matrix in-place.
- Parameters
- XCSR or CSC sparse matrix, shape=(n_samples, n_features)
Matrix whose two columns are to be swapped.
- mint
Index of the column of X to be swapped.
- nint
Index of the column of X to be swapped.