Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contrib.hsgp): fix incorrect dim arg to partial spectral density fns #1808

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions numpyro/contrib/hsgp/spectral_densities.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def diag_spectral_density_squared_exponential(

def _spectral_density(w):
return spectral_density_squared_exponential(
dim=1, w=w, alpha=alpha, length=length
dim=dim, w=w, alpha=alpha, length=length
)

sqrt_eigenvalues_ = sqrt_eigenvalues(ell=ell, m=m, dim=dim) # dim x m
Expand Down Expand Up @@ -151,7 +151,7 @@ def diag_spectral_density_matern(
"""

def _spectral_density(w):
return spectral_density_matern(dim=1, nu=nu, w=w, alpha=alpha, length=length)
return spectral_density_matern(dim=dim, nu=nu, w=w, alpha=alpha, length=length)

sqrt_eigenvalues_ = sqrt_eigenvalues(ell=ell, m=m, dim=dim)
return vmap(_spectral_density, in_axes=-1)(sqrt_eigenvalues_)
Expand Down
Loading