<a id="skfolio-utils-stats-commutation-matrix"></a>

# skfolio.utils.stats.commutation_matrix

<a id="skfolio.utils.stats.commutation_matrix"></a>

### skfolio.utils.stats.commutation_matrix(x)

Compute the commutation matrix.

* **Parameters:**
  **x** *ndarray of shape (n, m)*
  : The matrix.
* **Returns:**
  **K** *ndarray of shape (m \* n, m \* n)*
  : The commutation matrix.

