mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
caching now per instance, not at def time
This commit is contained in:
parent
044e714ad4
commit
0b5f6ea7c6
4 changed files with 38 additions and 20 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
|
||||
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
||||
|
||||
__updated__ = '2014-03-17'
|
||||
__updated__ = '2014-03-21'
|
||||
|
||||
import numpy as np
|
||||
from parameter_core import Observable
|
||||
|
|
@ -55,7 +55,7 @@ class ObsAr(np.ndarray, Observable):
|
|||
def __setitem__(self, s, val):
|
||||
if self._s_not_empty(s):
|
||||
super(ObsAr, self).__setitem__(s, val)
|
||||
self.notify_observers(self[s])
|
||||
self.notify_observers()
|
||||
|
||||
def __getslice__(self, start, stop):
|
||||
return self.__getitem__(slice(start, stop))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue