drbenvincent / darc_toolbox

Run adaptive decision making experiments
MIT License
16 stars 2 forks source link

resolve warnings in optimisation.py #18

Closed drbenvincent closed 5 years ago

drbenvincent commented 5 years ago
../../bad/optimisation.py:151: RuntimeWarning: invalid value encountered in true_divide
  (n_times_sampled+n_times_sampled_iter))

and

../../bad/optimisation.py:224: RuntimeWarning: invalid value encountered in true_divide
  (n_times_sampled + n_times_sampled_iter))
drbenvincent commented 5 years ago

This happens when the number of particles is low, which in turn cases some values of n_times_sampled_iter to be zero and we get a divide by zero issue. This is fine as we deal with these cases later. It might be an indication that the number of particles being used (in the design optimisation) is on the low side. But it is not considered a problem as such.