Either the the data from a model as
    X the inputs,
    X_variance the variance of the inputs ([default: None])
    and Y the outputs

    If (X, X_variance, Y) is given, this just returns.

    :returns: (X, X_variance, Y)

def get_x_y_var(model):
    """
    Either the the data from a model as
    X the inputs,
    X_variance the variance of the inputs ([default: None])
    and Y the outputs

    If (X, X_variance, Y) is given, this just returns.

    :returns: (X, X_variance, Y)
    """
    # model given
    if hasattr(model, 'has_uncertain_inputs') and model.has_uncertain_inputs():
        X = model.X.mean.values
        X_variance = model.X.variance.values
    else:
        try:
            X = model.X.values
        except AttributeError:
            X = model.X
        X_variance = None
    try:
        Y = model.Y.values
    except AttributeError:
        Y = model.Y

    if isinstance(model, WarpedGP) and not model.predict_in_warped_space:
        Y = model.Y_normalized
    
    if sparse.issparse(Y): Y = Y.todense().view(np.ndarray)
    return X, X_variance, Y