mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
Convert print to function for Python 3 compatibility
This commit is contained in:
parent
4512964f09
commit
4b4e5d4901
5 changed files with 10 additions and 10 deletions
|
|
@ -62,7 +62,7 @@ def plot_latent(model, labels=None, which_indices=None,
|
|||
|
||||
|
||||
if X.shape[0] > 1000:
|
||||
print "Warning: subsampling X, as it has more samples then 1000. X.shape={!s}".format(X.shape)
|
||||
print("Warning: subsampling X, as it has more samples then 1000. X.shape={!s}".format(X.shape))
|
||||
subsample = np.random.choice(X.shape[0], size=1000, replace=False)
|
||||
X = X[subsample]
|
||||
labels = labels[subsample]
|
||||
|
|
@ -187,14 +187,14 @@ def plot_latent(model, labels=None, which_indices=None,
|
|||
fig.tight_layout()
|
||||
fig.canvas.draw()
|
||||
except Exception as e:
|
||||
print "Could not invoke tight layout: {}".format(e)
|
||||
print("Could not invoke tight layout: {}".format(e))
|
||||
pass
|
||||
|
||||
if updates:
|
||||
try:
|
||||
ax.figure.canvas.show()
|
||||
except Exception as e:
|
||||
print "Could not invoke show: {}".format(e)
|
||||
print("Could not invoke show: {}".format(e))
|
||||
raw_input('Enter to continue')
|
||||
view.deactivate()
|
||||
return ax
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue