[doc] updated how to plot in gpy

This commit is contained in:
mzwiessele 2015-10-12 14:50:42 +01:00
parent 134144c4c7
commit fe423b88eb
6 changed files with 63 additions and 6 deletions

View file

@ -84,6 +84,11 @@ if config.get('plotting', 'library') is not 'none':
from ..kern import Kern
Kern.plot_covariance = gpy_plot.kernel_plots.plot_covariance
def deprecate_plot(self, *args, **kwargs):
import warnings
warnings.warn(DeprecationWarning('Kern.plot is being deprecated and will not be available in the 1.0 release. Use Kern.plot_covariance instead'))
return self.plot_covariance(*args, **kwargs)
Kern.plot = deprecate_plot
Kern.plot_ARD = gpy_plot.kernel_plots.plot_ARD
from ..inference.optimization import Optimizer

View file

@ -136,6 +136,4 @@ def plot_covariance(kernel, x=None, label=None,
return pl().add_to_canvas(canvas, plots)
else:
raise NotImplementedError("Cannot plot a kernel with more than two input dimensions")
pass
raise NotImplementedError("Cannot plot a kernel with more than two input dimensions")