def get_x_y_var(model):
<EOL>if hasattr(model, '<STR_LIT>') and model.has_uncertain_inputs():<EOL><INDENT>X = model.X.mean.values<EOL>X_variance = model.X.variance.values<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>X = model.X.values<EOL><DEDENT>except AttributeError:<EOL><INDENT>X = model.X<EOL><DEDENT>X_variance = None<EOL><DEDENT>try:<EOL><INDENT>Y = model.Y.values<EOL><DEDENT>except AttributeError:<EOL><INDENT>Y = model.Y<EOL><DEDENT>if isinstance(model, WarpedGP) and not model.predict_in_warped_space:<EOL><INDENT>Y = model.Y_normalized<EOL><DEDENT>if sparse.issparse(Y): Y = Y.todense().view(np.ndarray)<EOL>return X, X_variance, Y<EOL>
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)