Skip to content

Commit

Permalink
Extend beyond 1D
Browse files Browse the repository at this point in the history
  • Loading branch information
ziatdinovmax committed Jan 2, 2024
1 parent 7035dcc commit 3121fdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpax/acquisition/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def optimize_acq(rng_key: jnp.ndarray,
) from e

def acq(x):
obj = -acq_fn(rng_key, model, jnp.array([x])[None], **kwargs)
x = jnp.array([x])
x = x[None] if x.ndim == 0 else x
obj = -acq_fn(rng_key, model, x, **kwargs)
return jnp.reshape(obj, ())

lower_bound = ensure_array(lower_bound)
Expand Down

0 comments on commit 3121fdb

Please sign in to comment.