COO.swapaxes
- COO.swapaxes(axis1, axis2)[source]
Returns array that has axes axis1 and axis2 swapped.
- Parameters:
- Returns:
The new array with the axes axis1 and axis2 swapped.
- Return type:
Examples
>>> x = COO.from_numpy(np.ones((2, 3, 4))) >>> x.swapaxes(0, 2) <COO: shape=(4, 3, 2), dtype=float64, nnz=24, fill_value=0.0>