Skip to content

Commit

Permalink
use runtime error instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpvandermause committed Nov 1, 2024
1 parent 6c0af57 commit 47431da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flare_pp/bffs/sparse_gp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ void SparseGP ::add_specific_environments(const Structure &structure,
void SparseGP ::add_uncertain_environments(const Structure &structure,
const std::vector<int> &n_added) {

assert(n_added.size() == n_kernels && "n_added must have the same size as the number of kernels");
if (n_added.size() != n_kernels) {
throw std::runtime_error("n_added must have the same size as the number of kernels");
}

initialize_sparse_descriptors(structure);
// Compute cluster uncertainties.
Expand Down

0 comments on commit 47431da

Please sign in to comment.