Skip to content

Commit

Permalink
Fix incorrect function calls in kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamrick committed Nov 28, 2013
1 parent 32421bf commit 57dc5b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gp/kernels/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,23 @@ def dK_dw(self, x1, x2, out=None):
def d2K_dhdh(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
gaussian_c.dK_dhdh(out, x1, x2, self.h, self.w)
gaussian_c.d2K_dhdh(out, x1, x2, self.h, self.w)
return out

def d2K_dhdw(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
gaussian_c.dK_dhdw(out, x1, x2, self.h, self.w)
gaussian_c.d2K_dhdw(out, x1, x2, self.h, self.w)
return out

def d2K_dwdh(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
gaussian_c.dK_dwdh(out, x1, x2, self.h, self.w)
gaussian_c.d2K_dwdh(out, x1, x2, self.h, self.w)
return out

def d2K_dwdw(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
gaussian_c.dK_dwdw(out, x1, x2, self.h, self.w)
gaussian_c.d2K_dwdw(out, x1, x2, self.h, self.w)
return out
18 changes: 9 additions & 9 deletions gp/kernels/periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,53 +115,53 @@ def dK_dp(self, x1, x2, out=None):
def d2K_dhdh(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dhdh(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dhdh(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dhdw(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dhdw(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dhdw(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dhdp(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dhdp(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dhdp(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dwdh(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dwdh(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dwdh(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dwdw(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dwdw(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dwdw(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dwdp(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dwdp(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dwdp(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dpdh(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dpdh(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dpdh(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dpdw(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dpdw(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dpdw(out, x1, x2, self.h, self.w, self.p)
return out

def d2K_dpdp(self, x1, x2, out=None):
if out is None:
out = np.empty((x1.size, x2.size), dtype=DTYPE)
periodic_c.dK_dpdp(out, x1, x2, self.h, self.w, self.p)
periodic_c.d2K_dpdp(out, x1, x2, self.h, self.w, self.p)
return out

0 comments on commit 57dc5b4

Please sign in to comment.