Missing variable
@@ -160,7 +160,8 @@ def test_down_sample_interval(net: BayesNet) -> None:
def test_sample_with_plot(net: BayesNet) -> None:
KeanuRandom.set_default_random_seed(1)
- _, ax = plt.subplots(3, 1, squeeze=False)
+ num_plots = 3
+ _, ax = plt.subplots(num_plots, 1, squeeze=False)
sample(net=net, sample_from=net.get_latent_vertices(), draws=5, plot=True, ax=ax)
reorder_subplots(ax)
@@ -231,7 +232,8 @@ def test_iter_returns_same_result_as_sample() -> None:
def test_iter_with_live_plot(net: BayesNet) -> None:
KeanuRandom.set_default_random_seed(1)
- _, ax = plt.subplots(3, 1, squeeze=False)
+ num_plots = 3
+ _, ax = plt.subplots(num_plots, 1, squeeze=False)
samples = generate_samples(net=net, sample_from=net.get_latent_vertices(), live_plot=True, refresh_every=5, ax=ax)
for sample in islice(samples, 5):
