From 7a9203be4d57c58dd3c5d1a9b3f8c02423368763 Mon Sep 17 00:00:00 2001 From: Mike Croucher Date: Fri, 27 Feb 2015 17:50:48 +0000 Subject: [PATCH] More input fixes --- GPy/inference/mcmc/__init__.py | 2 +- GPy/inference/mcmc/samplers.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/GPy/inference/mcmc/__init__.py b/GPy/inference/mcmc/__init__.py index 956448d4..8f185457 100644 --- a/GPy/inference/mcmc/__init__.py +++ b/GPy/inference/mcmc/__init__.py @@ -1 +1 @@ -from hmc import HMC +from .hmc import HMC diff --git a/GPy/inference/mcmc/samplers.py b/GPy/inference/mcmc/samplers.py index ff396a96..6459e8af 100644 --- a/GPy/inference/mcmc/samplers.py +++ b/GPy/inference/mcmc/samplers.py @@ -9,7 +9,13 @@ import sys import re import numdifftools as ndt import pdb -import cPickle + +try: + #In Python 2, cPickle is faster. It does not exist in Python 3 but the underlying code is always used + #if available + import cPickle as pickle +except ImportError: + import pickle class Metropolis_Hastings: