Skip to content

Commit

Permalink
Use broadcast_shapes to align params
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Anklesaria committed Jun 24, 2024
1 parent 03c70f3 commit f0cbaa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpyro/contrib/hsgp/spectral_densities.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def align_param(dim, param):
return jnp.broadcast_arrays(param, jnp.zeros(dim))[0]
return jnp.broadcast_to(param, jnp.broadcast_shapes(jnp.shape(param), (dim,)))


def spectral_density_squared_exponential(
Expand Down

0 comments on commit f0cbaa9

Please sign in to comment.