<a id="skfolio-utils-stats-assert-is-symmetric"></a>

# skfolio.utils.stats.assert_is_symmetric

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

### skfolio.utils.stats.assert_is_symmetric(x, \*, rtol=1e-05, atol=1e-08)

Raises an error if the matrix is not symmetric.

* **Parameters:**
  **x** *ndarray of shape (n, m)*
  : The matrix.

  **rtol** *float, default=1e-5*
  : Relative tolerance for `numpy.allclose`.

  **atol** *float, default=1e-8*
  : Absolute tolerance for `numpy.allclose`.
* **Raises:**
  ValueError: if the matrix is not symmetric.

