mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 20:12:38 +02:00
new slicing done and first attempts at copy and pickling full models
This commit is contained in:
parent
c65a1e3544
commit
e26e737014
2 changed files with 103 additions and 86 deletions
|
|
@ -101,7 +101,7 @@ class Cacher(object):
|
|||
def __name__(self):
|
||||
return self.operation.__name__
|
||||
|
||||
from functools import partial
|
||||
from functools import partial, update_wrapper
|
||||
|
||||
class Cacher_wrap(object):
|
||||
def __init__(self, f, limit, ignore_args, force_kwargs):
|
||||
|
|
@ -109,6 +109,7 @@ class Cacher_wrap(object):
|
|||
self.ignore_args = ignore_args
|
||||
self.force_kwargs = force_kwargs
|
||||
self.f = f
|
||||
update_wrapper(self, self.f)
|
||||
def __get__(self, obj, objtype=None):
|
||||
return partial(self, obj)
|
||||
def __call__(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue