def set_XY(self, X=None, Y=None):
self.update_model(False)<EOL>if Y is not None:<EOL><INDENT>if self.normalizer is not None:<EOL><INDENT>self.normalizer.scale_by(Y)<EOL>self.Y_normalized = ObsAr(self.normalizer.normalize(Y))<EOL>self.Y = Y<EOL><DEDENT>else:<EOL><INDENT>self.Y = ObsAr(Y)<EOL>self.Y_normalized = self.Y<EOL><DEDENT><DEDENT>if X is not None:<EOL><INDENT>if self.X in self.parameters:<EOL><INDENT>if isinstance(self.X, VariationalPosterior):<EOL><INDENT>assert isinstance(X, type(self.X)), "<STR_LIT>"<EOL>index = self.X._parent_index_<EOL>self.unlink_parameter(self.X)<EOL>self.X = X<EOL>self.link_parameter(self.X, index=index)<EOL><DEDENT>else:<EOL><INDENT>index = self.X._parent_index_<EOL>self.unlink_parameter(self.X)<EOL>from ..core import Param<EOL>self.X = Param('<STR_LIT>', X)<EOL>self.link_parameter(self.X, index=index)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.X = ObsAr(X)<EOL><DEDENT><DEDENT>self.update_model(True)<EOL>
Set the input / output data of the model
This is useful if we wish to change our existing data but maintain the same model

:param X: input observations
:type X: np.ndarray
:param Y: output observations
:type Y: np.ndarray