def _check_symmetry(matrix):
    """
    Checks whether a matrix M is symmetric, i.e. M = M^T.
    By @t-kimber.

    Parameters
    ----------
    matrix : np.array
        The matrix for which the condition should be checked.

    Returns
    -------
    bool :
        True if the condition is met, False otherwise.
    """
    return (matrix == matrix.transpose()).all()