W3cubDocs

/scikit-learn

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:
X : CSR or CSC sparse matrix, shape=(n_samples, n_features)

Matrix whose two columns are to be swapped.

m : int

Index of the column of X to be swapped.

n : int

Index of the column of X to be swapped.

© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.sparsefuncs.inplace_swap_column.html