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.
In Line 358 of
resamplers.py
, the new weights array to be returned is calculated asnp.ones((w.shape[0],)) / w.shape[0]
, wherew
is the weight array for the original (pre-resampling) particle approximation. This fails, however, if the resampler is called with an explicitn_particles
argument.