From 61a6086af6bbd4e6205cfe83a065d99b00385a68 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Mon, 24 Feb 2014 08:22:06 +0000 Subject: [PATCH] minor fixes in kerns --- GPy/kern/__init__.py | 2 +- GPy/kern/_src/bias.py | 1 + GPy/kern/_src/stationary.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/GPy/kern/__init__.py b/GPy/kern/__init__.py index e5dc6d35..594ff6d3 100644 --- a/GPy/kern/__init__.py +++ b/GPy/kern/__init__.py @@ -2,9 +2,9 @@ from _src.rbf import RBF from _src.white import White from _src.kern import Kern from _src.linear import Linear +from _src.bias import Bias from _src.brownian import Brownian from _src.stationary import Exponential, Matern32, Matern52, ExpQuad -#from _src.bias import Bias #import coregionalize #import exponential #import eq_ode1 diff --git a/GPy/kern/_src/bias.py b/GPy/kern/_src/bias.py index d45561f8..e1938c95 100644 --- a/GPy/kern/_src/bias.py +++ b/GPy/kern/_src/bias.py @@ -5,6 +5,7 @@ from kern import Kern from ...core.parameterization import Param from ...core.parameterization.transformations import Logexp +import numpy as np class Bias(Kern): def __init__(self,input_dim,variance=1.,name=None): diff --git a/GPy/kern/_src/stationary.py b/GPy/kern/_src/stationary.py index 7cc2e695..a6ff9424 100644 --- a/GPy/kern/_src/stationary.py +++ b/GPy/kern/_src/stationary.py @@ -18,7 +18,7 @@ class Stationary(Kern): lengthscale = np.ones(1) else: lengthscale = np.asarray(lengthscale) - assert lengthscale.size == 1 "Only lengthscale needed for non-ARD kernel" + assert lengthscale.size == 1, "Only lengthscale needed for non-ARD kernel" else: if lengthscale is not None: lengthscale = np.asarray(lengthscale)