mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-10 12:32:40 +02:00
xrange fixes for Python 3
This commit is contained in:
parent
5eeb2f18e9
commit
cf1c382acd
14 changed files with 29 additions and 29 deletions
|
|
@ -653,7 +653,7 @@ def ssgplvm_simulation_linear():
|
|||
def sample_X(Q, pi):
|
||||
x = np.empty(Q)
|
||||
dies = np.random.rand(Q)
|
||||
for q in xrange(Q):
|
||||
for q in range(Q):
|
||||
if dies[q] < pi:
|
||||
x[q] = np.random.randn()
|
||||
else:
|
||||
|
|
@ -663,7 +663,7 @@ def ssgplvm_simulation_linear():
|
|||
Y = np.empty((N, D))
|
||||
X = np.empty((N, Q))
|
||||
# Generate data from random sampled weight matrices
|
||||
for n in xrange(N):
|
||||
for n in range(N):
|
||||
X[n] = sample_X(Q, pi)
|
||||
w = np.random.randn(D, Q)
|
||||
Y[n] = np.dot(w, X[n])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue