Skip to content

Commit efa57dd

Browse files
Replace uses of remove pm.gp.util.infer_size function (#45)
Closes #44
1 parent 93e7026 commit efa57dd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymc_experimental/gp/latent_approx.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
JITTER_DEFAULT,
77
cholesky,
88
conditioned_vars,
9-
infer_size,
109
replace_with_values,
1110
solve_lower,
1211
solve_upper,
@@ -30,7 +29,7 @@ def _build_prior(self, name, X, Xu, jitter=JITTER_DEFAULT, **kwargs):
3029
Kuu = self.cov_func(Xu)
3130
L = cholesky(stabilize(Kuu, jitter))
3231

33-
n_inducing_points = infer_size(Xu, kwargs.pop("size", None))
32+
n_inducing_points = np.shape(Xu)[0]
3433
v = pm.Normal(name + "_u_rotated_", mu=0.0, sigma=1.0, size=n_inducing_points, **kwargs)
3534
u = pm.Deterministic(name + "_u", L @ v)
3635

@@ -97,7 +96,7 @@ def _generate_basis(self, X, L):
9796
return Phi, omega
9897

9998
def _build_prior(self, name, X, **kwargs):
100-
n_obs = pm.gp.util.infer_size(X, kwargs.get("n_obs"))
99+
n_obs = np.shape(X)[0]
101100

102101
# standardize input scale
103102
X = at.as_tensor_variable(X)

0 commit comments

Comments
 (0)