logic edits for copy

This commit is contained in:
Max Zwiessele 2014-03-03 15:07:33 +00:00
parent 441a9f524d
commit a98334e009
5 changed files with 144 additions and 138 deletions

View file

@ -31,7 +31,7 @@ class GP(Model):
super(GP, self).__init__(name)
assert X.ndim == 2
if isinstance(X, ObservableArray) or isinstance(X, VariationalPosterior):
if isinstance(X, (ObservableArray, VariationalPosterior)):
self.X = X
else: self.X = ObservableArray(X)
@ -224,13 +224,9 @@ class GP(Model):
self.kern,
self.likelihood,
self.output_dim,
self._Xoffset,
self._Xscale,
]
def _setstate(self, state):
self._Xscale = state.pop()
self._Xoffset = state.pop()
self.output_dim = state.pop()
self.likelihood = state.pop()
self.kern = state.pop()