diff --git a/GPy/__init__.py b/GPy/__init__.py index 5af56dc4..f7d6e1d6 100644 --- a/GPy/__init__.py +++ b/GPy/__init__.py @@ -43,20 +43,6 @@ def load(file_or_path): :param file_name: path/to/file.pickle """ try: - unicode = unicode - except NameError: - # 'unicode' is undefined, must be Python 3 - str = str - unicode = str - bytes = bytes - basestring = (str,bytes) - else: - # 'unicode' exists, must be Python 2 - str = str - unicode = unicode - bytes = str - basestring = basestring - try: import cPickle as pickle if isinstance(file_or_path, basestring): with open(file_or_path, 'rb') as f: @@ -65,7 +51,7 @@ def load(file_or_path): m = pickle.load(file_or_path) except: import pickle - if isinstance(file_or_path, basestring): + if isinstance(file_or_path, str): with open(file_or_path, 'rb') as f: m = pickle.load(f) else: diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index e60928a7..7f788261 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -103,7 +103,7 @@ def test_kernel(): k.randomize() k2 = GPy.kern.RBF(5, ARD=True) + GPy.kern.Linear(3, active_dims=[0,2,4], ARD=True) + GPy.kern.Bias(2) + GPy.kern.White(4) k2[:-1] = k[:] - k2.plot_ARD([k2.white.name], legend=True) + k2.plot_ARD([_.name for _ in k.parts], legend=True) for do_test in _image_comparison( baseline_images=['kern_{}'.format(sub) for sub in ["ARD",]], extensions=extensions):