SciPy

scipy.sparse.coo_matrix.transpose

coo_matrix.transpose(self, axes=None, copy=False)[source]

Reverses the dimensions of the sparse matrix.

Parameters
axesNone, optional

This argument is in the signature solely for NumPy compatibility reasons. Do not pass in anything except for the default value.

copybool, optional

Indicates whether or not attributes of self should be copied whenever possible. The degree to which attributes are copied varies depending on the type of sparse matrix being used.

Returns
pself with the dimensions reversed.

See also

np.matrix.transpose

NumPy’s implementation of ‘transpose’ for matrices

Previous topic

scipy.sparse.coo_matrix.tolil

Next topic

scipy.sparse.coo_matrix.trunc