diff --git a/GPy/util/linalg.py b/GPy/util/linalg.py index 0c4cdc50..9fd44a8d 100644 --- a/GPy/util/linalg.py +++ b/GPy/util/linalg.py @@ -6,7 +6,7 @@ # http://homepages.inf.ed.ac.uk/imurray2/code/tdot/tdot.py import numpy as np -from scipy import linalg, weave +from scipy import linalg import types import ctypes from ctypes import byref, c_char, c_int, c_double # TODO @@ -16,6 +16,12 @@ import os from .config import config import logging +try: + from scipy import weave +except ImportError: + config.set('weave', 'working', 'False') + + _scipyversion = np.float64((scipy.__version__).split('.')[:2]) _fix_dpotri_scipy_bug = True if np.all(_scipyversion >= np.array([0, 14])): diff --git a/README.md b/README.md index dca746bf..17dfc241 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,6 @@ A Gaussian processes framework in Python. Continuous integration status: ![CI status](https://travis-ci.org/SheffieldML/GPy.png) -### Moving to Python 3 -Work is underway to make GPy run on Python 3. We are not there yet! Changes performed so far have retained compatibility with Python 2.6 and above. - -Work done so far: - -* Used 2to3 to fix relative imports -* Used 2to3 to convert print from statement to function. Some advanced uses of print meant that this could not be done in a way that retained compatibility with old versions of Python. The oldest version of Python that is supported by this version is 2.6 due to the required future imports. -* Used 2to3 to convert exceptions to Python 3 friendly versions. There are a few oustanding string exceptions to take care of that 2to3 doesn't handle. Will need to do these manually - ### Citation @Misc{gpy2014, @@ -119,6 +110,20 @@ or from within IPython import GPy; GPy.tests() +### Moving to Python 3 +Work is underway to make GPy run on Python 3. We are not there yet! Changes performed so far have retained compatibility with Python 2.6 and above. + +Work done so far: + +* Used 2to3 to fix relative imports +* Used 2to3 to convert print from statement to function. Some advanced uses of print meant that this could not be done in a way that retained compatibility with old versions of Python. The oldest version of Python that is supported by this version is 2.6 due to the required future imports. +* Used 2to3 to convert exceptions to Python 3 friendly versions. There are a few oustanding string exceptions to take care of that 2to3 doesn't handle. Will need to do these manually +* Handled the different imports required for ConfigParser/configparser in Py2/Py3 +* In utils/linalg.py: + * Commented out the function cholupdate(L, x) since it doesn't appear to be used. Its definitely not in the tests.s + * Put the import for scipy.weave in a try/except block so that it will gracefully fail in Py3 + + ## Funding Acknowledgements