mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 13:32:39 +02:00
Change in _diag_ufunc with @mzwiessele
This commit is contained in:
parent
f780693577
commit
21f6b92475
1 changed files with 2 additions and 0 deletions
|
|
@ -46,6 +46,8 @@ def offdiag_view(A, offset=0):
|
||||||
return as_strided(Af[(1+offset):], shape=(A.shape[0]-1, A.shape[1]), strides=(A.strides[0] + A.itemsize, A.strides[1]))
|
return as_strided(Af[(1+offset):], shape=(A.shape[0]-1, A.shape[1]), strides=(A.strides[0] + A.itemsize, A.strides[1]))
|
||||||
|
|
||||||
def _diag_ufunc(A,b,offset,func):
|
def _diag_ufunc(A,b,offset,func):
|
||||||
|
b = np.squeeze(b)
|
||||||
|
assert b.ndim <= 1, "only implemented for one dimensional arrays"
|
||||||
dA = view(A, offset); func(dA,b,dA)
|
dA = view(A, offset); func(dA,b,dA)
|
||||||
return A
|
return A
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue