QInfer / python-qinfer

Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.
BSD 3-Clause "New" or "Revised" License
92 stars 31 forks source link

Liu-West Resampler returns wrong shape weights when changing n_particles #103

Open cgranade opened 7 years ago

cgranade commented 7 years ago

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.