Skip to content

Commit

Permalink
fixing dtype issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Mar 26, 2021
1 parent fcc0919 commit bdea294
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/tinygp/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from .kernels import Kernel
from .means import Mean, constant_mean, zero_mean

LOG2PI = jnp.log(2 * jnp.pi)


class GaussianProcess:
def __init__(
Expand Down Expand Up @@ -49,10 +47,8 @@ def __init__(
)
self.lower = lower
self.chol = linalg.cholesky(self.K, lower=self.lower)
self.norm = (
jnp.sum(jnp.log(jnp.diag(self.chol)))
+ 0.5 * self.X.shape[0] * LOG2PI
)
self.norm = jnp.sum(jnp.log(jnp.diag(self.chol)))
self.norm += 0.5 * self.X.shape[0] * jnp.log(2 * jnp.pi)

def condition(self, y: jnp.ndarray) -> jnp.ndarray:
self.y = jnp.broadcast_to(y, (self.size,))
Expand Down

0 comments on commit bdea294

Please sign in to comment.