Merge branch 'devel' of github.com:SheffieldML/GPy into devel

This commit is contained in:
Zhenwen Dai 2015-09-04 17:27:34 +01:00
commit 7335d4e62e
6 changed files with 26 additions and 40 deletions

View file

@ -3,6 +3,7 @@
from ..core.parameterization.observable import Observable
import collections, weakref
from functools import reduce
from pickle import PickleError
class Cacher(object):
def __init__(self, operation, limit=5, ignore_args=(), force_kwargs=()):
@ -149,10 +150,10 @@ class Cacher(object):
return Cacher(self.operation, self.limit, self.ignore_args, self.force_kwargs)
def __getstate__(self, memo=None):
raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
raise PickleError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
def __setstate__(self, memo=None):
raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
raise PickleError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
@property
def __name__(self):