diff --git a/.travis.yml b/.travis.yml index af20bec4..e7944d8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,20 @@ language: python python: - "2.7" + +#Set virtual env with system-site-packages to true +virtualenv: + system_site_packages: true + # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: - - sudo apt-get install python-scipy - - pip install sphinx +before_install: + - sudo apt-get install -qq python-scipy python-pip + - sudo apt-get install -qq python-matplotlib + +install: + - pip install sphinx + - pip install nose - pip install . --use-mirrors # command to run tests, e.g. python setup.py test script: - - nosetests --with-xcoverage --with-xunit --cover-package=GPy --cover-erase GPy/testing + - nosetests GPy/testing \ No newline at end of file diff --git a/GPy/kern/linear.py b/GPy/kern/linear.py index 89e87314..d36e40b7 100644 --- a/GPy/kern/linear.py +++ b/GPy/kern/linear.py @@ -28,6 +28,9 @@ class linear(kernpart): self.Nparam = 1 self.name = 'linear' if variances is not None: + if isinstance(variances, float): + variances = np.array([variances]) + assert variances.shape == (1,) else: variances = np.ones(1) diff --git a/README.md b/README.md index c69352b8..0b5d00ce 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ GPy === -A Gaussian processes framework in python. +A Gaussian processes framework in python * [Online documentation](https://gpy.readthedocs.org/en/latest/) * [Unit tests (Travis-CI)](https://travis-ci.org/SheffieldML/GPy) \ No newline at end of file