mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-26 15:49:40 +02:00
fix: Fixed numpy 1.12 indexing and shape preservation
This commit is contained in:
parent
a7a2e53f6d
commit
96cc0838eb
9 changed files with 26 additions and 25 deletions
|
|
@ -36,12 +36,12 @@ class GaussianGridInference(LatentFunctionInference):
|
|||
x = b
|
||||
N = 1
|
||||
D = len(A)
|
||||
G = np.zeros((D,1))
|
||||
G = np.zeros((D), dtype=np.int_)
|
||||
for d in range(0, D):
|
||||
G[d] = len(A[d])
|
||||
N = np.prod(G)
|
||||
for d in range(D-1, -1, -1):
|
||||
X = np.reshape(x, (G[d], np.round(N/G[d])), order='F')
|
||||
X = np.reshape(x, (G[d], int(np.round(N/G[d]))), order='F')
|
||||
Z = np.dot(A[d], X)
|
||||
Z = Z.T
|
||||
x = np.reshape(Z, (-1, 1), order='F')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue