From 54c1ba2e60b79a152caeea5fc164927ccc67b73d Mon Sep 17 00:00:00 2001 From: Pranjal Dhole Date: Tue, 14 May 2024 18:06:56 +0200 Subject: [PATCH] bug fix saving prey list correctly --- causal_inference/base/lotka_volterra.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causal_inference/base/lotka_volterra.py b/causal_inference/base/lotka_volterra.py index e638944..28242ec 100644 --- a/causal_inference/base/lotka_volterra.py +++ b/causal_inference/base/lotka_volterra.py @@ -65,7 +65,7 @@ def runge_kutta_update(self, current_prey, current_predators): def _save_population(self): filename = os.path.join(RESULTS_DIR, 'populations.h5') hf = h5py.File(filename, 'w') - hf.create_dataset('prey_pop', data=self.predator_list) + hf.create_dataset('prey_pop', data=self.prey_list) hf.create_dataset('pred_pop', data=self.predator_list) hf.close()