mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-02 14:45:15 +02:00
fix: Fixed numpy 1.12 indexing and shape preservation
This commit is contained in:
parent
afe37dbfd8
commit
6cd13ac2b3
9 changed files with 26 additions and 25 deletions
|
|
@ -68,12 +68,12 @@ class GpGrid(GP):
|
|||
for b in (B.T):
|
||||
x = b
|
||||
N = 1
|
||||
G = np.zeros(D)
|
||||
G = np.zeros(D, dtype=np.int_)
|
||||
for d in range(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