diff --git a/GPy/examples/regression.py b/GPy/examples/regression.py index c7849a46..f969bbe4 100644 --- a/GPy/examples/regression.py +++ b/GPy/examples/regression.py @@ -163,7 +163,7 @@ def multiple_optima(gene_number=937, resolution=80, model_restarts=10, seed=1000 data['Y'] = data['Y'] - np.mean(data['Y']) lls = GPy.examples.regression._contour_data(data, length_scales, log_SNRs, GPy.kern.rbf) - pb.contour(length_scales, log_SNRs, np.exp(lls), 20, cmap=pb.cm.jet) + pb.contour(length_scales, log_SNRs, np.exp(lls), 20, cmap=pb.cm.jet) # @UndefinedVariable ax = pb.gca() pb.xlabel('length scale') pb.ylabel('log_10 SNR') diff --git a/GPy/kern/kern.py b/GPy/kern/kern.py index d9928295..2dc943bf 100644 --- a/GPy/kern/kern.py +++ b/GPy/kern/kern.py @@ -8,6 +8,7 @@ from parts.kernpart import Kernpart import itertools from parts.prod import Prod as prod from matplotlib.transforms import offset_copy +import GPy class kern(Parameterized): def __init__(self, input_dim, parts=[], input_slices=None): diff --git a/GPy/kern/parts/kernpart.py b/GPy/kern/parts/kernpart.py index edbdc091..2d3d1191 100644 --- a/GPy/kern/parts/kernpart.py +++ b/GPy/kern/parts/kernpart.py @@ -1,5 +1,6 @@ # Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) +import numpy class Kernpart(object): @@ -72,5 +73,5 @@ class Kernpart_inner(Kernpart): Kernpart.__init__(self, input_dim) # initialize cache - self._Z, self._mu, self._S = np.empty(shape=(3, 1)) - self._X, self._X2, self._params = np.empty(shape=(3, 1)) + self._Z, self._mu, self._S = numpy.empty(shape=(3, 1)) + self._X, self._X2, self._params = numpy.empty(shape=(3, 1)) diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py index 8afd1470..d6f879ec 100644 --- a/GPy/util/datasets.py +++ b/GPy/util/datasets.py @@ -518,7 +518,7 @@ def simulation_BGPLVM(): Y = np.array(mat_data['Y'], dtype=float) S = np.array(mat_data['initS'], dtype=float) mu = np.array(mat_data['initMu'], dtype=float) - return data_details_return({'S': S, 'Y': Y, 'mu': mu}, data_set) + return data_details_return({'S': S, 'Y': Y, 'mu': mu}, mat_data) return {'Y': Y, 'S': S, 'mu' : mu, 'info': "Simulated test dataset generated in MATLAB to compare BGPLVM between python and MATLAB"}