def inplace_swap_column(X, m, n):
 if (m < 0):
  m += X.shape[1]
 if (n < 0):
  n += X.shape[1]
 if isinstance(X, sp.csc_matrix):
  return inplace_swap_row_csr(X, m, n)
 elif isinstance(X, sp.csr_matrix):
  return inplace_swap_row_csc(X, m, n)
 else:
  _raise_typeerror(X)

def inplace_swap_column ( X , m , n ) : if ( m < 0 ) : m += X . shape [ 1 ] if ( n < 0 ) : n += X . shape [ 1 ] if isinstance ( X , sp . csc_matrix ) : return inplace_swap_row_csr ( X , m , n ) elif isinstance ( X , sp . csr_matrix ) : return inplace_swap_row_csc ( X , m , n ) else : _raise_typeerror ( X )
swaps two columns of a csc/csr matrix in-place .