From e4e43111214ef9bd6d7c5def59ee38a409367be5 Mon Sep 17 00:00:00 2001 From: mzwiessele Date: Mon, 5 Oct 2015 19:37:19 +0100 Subject: [PATCH] [plotting] gradient plot added --- GPy/plotting/gpy_plot/plot_util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GPy/plotting/gpy_plot/plot_util.py b/GPy/plotting/gpy_plot/plot_util.py index 4f3fdaf2..0e7dc651 100644 --- a/GPy/plotting/gpy_plot/plot_util.py +++ b/GPy/plotting/gpy_plot/plot_util.py @@ -135,8 +135,12 @@ def scatter_label_generator(labels, X, input_1, input_2=None, marker=None): elif type(ul) is np.int64: this_label = 'class %i' % ul else: - this_label = unicode(ul) - + try: + this_label = unicode(ul) + except NameError: + #python3 + this_label = ul + if marker is not None: m = marker.next()