def check_3d_array(X):
    """Check that the input is a three-dimensional array.

    Parameters
    ----------
    X : array-like
        Input data.

    Returns
    -------
    X_new : array
        Input data as an array.

    """
    X = check_array(X, ensure_2d=False, allow_nd=True)
    if X.ndim != 3:
        raise ValueError("X must be 3-dimensional (got {0}).".format(X.ndim))
    return X
Check that the input is a three-dimensional array.

    Parameters
    ----------
    X : array-like
        Input data.

    Returns
    -------
    X_new : array
        Input data as an array.

    
pyts/multivariate/utils/utils.py