Skip to content

Commit 252ac03

Browse files
authored
Merge pull request #139 from ihincks/bugfix-resampler-weight-shape
Fixed minor resampler shape bug
2 parents e90cc57 + 2755838 commit 252ac03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qinfer/resamplers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,6 @@ def __call__(self, model, particle_dist,
387387
# particles represent the information that used to be stored in the
388388
# weights. This is done by SMCUpdater, and so we simply need to return
389389
# the new locations here.
390-
new_weights = np.ones((w.shape[0],)) / w.shape[0]
390+
new_weights = np.ones((n_particles,)) / n_particles
391391
return ParticleDistribution(particle_locations=new_locs,
392392
particle_weights=new_weights)

0 commit comments

Comments
 (0)