tests passing (cython)

This commit is contained in:
James Hensman 2015-04-28 14:57:00 +01:00
parent e1c2eeb25d
commit 9e4c33910f
11 changed files with 6899 additions and 1256 deletions

File diff suppressed because it is too large Load diff

View file

@ -226,9 +226,8 @@ class Stationary(Kern):
if X2 is None:
tmp = tmp + tmp.T
X2 = X
grad = np.zeros_like(X)
if hasattr(X, 'values'):X = X.values #remove the GPy wrapping to make passing into weave safe
if hasattr(X2, 'values'):X2 = X2.values
X, X2 = np.ascontiguousarray(X), np.ascontiguousarray(X2)
grad = np.zeros(X.shape)
stationary_cython.grad_X(X.shape[0], X.shape[1], X2.shape[0], X, X2, tmp, grad)
return grad/self.lengthscale**2

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
void _grad_X(int N, int D, int M, double* X, double* X2, double* tmp, double* grad){
int n,m,d;
double retnd;
#pragma omp parallel for private(n,d, retnd, m)
//#pragma omp parallel for private(n,d, retnd, m)
for(d=0;d<D;d++){
for(n=0;n<N;n++){
retnd = 0.0;