mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 21:42:39 +02:00
workin gon linear kernel
This commit is contained in:
parent
0c92fca31a
commit
8b2f39450b
6 changed files with 83 additions and 140 deletions
|
|
@ -30,7 +30,7 @@ class ObservableArray(np.ndarray, Observable):
|
|||
def __new__(cls, input_array):
|
||||
obj = np.atleast_1d(input_array).view(cls)
|
||||
cls.__name__ = "ObservableArray\n "
|
||||
obj._observer_callables_ = {}
|
||||
obj._observer_callables_ = []
|
||||
return obj
|
||||
def __array_finalize__(self, obj):
|
||||
# see InfoArray.__array_finalize__ for comments
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class Param(ObservableArray, Constrainable, Gradcheckable, Indexable, Parentable
|
|||
return self.flat
|
||||
|
||||
def _collect_gradient(self, target):
|
||||
target[:] = self.gradient.flat
|
||||
target += self.gradient.flat
|
||||
|
||||
#===========================================================================
|
||||
# Array operations -> done
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ def adjust_name_for_printing(name):
|
|||
return ''
|
||||
|
||||
class Observable(object):
|
||||
_observer_callables_ = {}
|
||||
_observer_callables_ = []
|
||||
def add_observer(self, callble):
|
||||
self._observer_callables_.append(callble)
|
||||
#callble(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue