Skip to content

Commit

Permalink
check input dimensionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ziatdinovmax committed Aug 20, 2023
1 parent df1b80f commit cf52a6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpax/acquisition/batch_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def compute_batch_acquisition(acquisition_type: Callable,
"""
if model.mcmc is None:
raise ValueError("The model needs to be fully Bayesian")

X = X[:, None] if X.ndim < 2 else X

samples = random_sample_dict(model.get_samples(), subsample_size)
f = vmap(acquisition_type, in_axes=(None, None, 0) + (None,) * len(acq_args))
Expand Down

0 comments on commit cf52a6d

Please sign in to comment.