python-qinfer
python-qinfer copied to clipboard
Liu-West Resampler returns wrong shape weights when changing n_particles
In Line 358 of resamplers.py
, the new weights array to be returned is calculated as np.ones((w.shape[0],)) / w.shape[0]
, where w
is the weight array for the original (pre-resampling) particle approximation. This fails, however, if the resampler is called with an explicit n_particles
argument.