Skip to content

Commit

Permalink
just filter them -- no need for an error
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Aug 3, 2024
1 parent 09f1391 commit 735679b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions fwdpy11/headers/fwdpy11/regions/RecombinationRegions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,14 @@ namespace fwdpy11
poisson_lookup(nullptr), sum_poisson_means(0.0)
{
std::vector<double> means;
std::size_t zero = 0;
for (auto& i : poisson_callbacks)
{
if (i->mean_number_xovers() == 0.0)
{
zero += 1;
}
else
if (i->mean_number_xovers() > 0.0)
{
sum_poisson_means += i->mean_number_xovers();
means.push_back(i->mean_number_xovers());
}
}
if (zero == poisson_callbacks.size())
{
throw std::invalid_argument(
"all Poisson map elements have a mean of zero");
}
if (!means.empty())
{
fwdpy11_core::update_lookup_table(means.data(), means.size(),
Expand Down

0 comments on commit 735679b

Please sign in to comment.