Fix sample assignment
@@ -25,8 +25,8 @@ def iterate_samples(net, sample_from, algo='metropolis', drop=0, down_sample_int
vertices_unwrapped = k.to_java_object_list(sample_from)
sample_iterator = algorithms[algo].withDefaultConfig().generatePosteriorSamples(net.unwrap(), vertices_unwrapped)
- sample_iterator.dropCount(drop).downSampleInterval(down_sample_interval)
- sample_iterator.stream().iterator()
+ sample_iterator = sample_iterator.dropCount(drop).downSampleInterval(down_sample_interval)
+ sample_iterator = sample_iterator.stream().iterator()
return _iterator_samples(sample_iterator, vertices_unwrapped)
