From 48d66b200978603a759fbb46559cecb45e288d6e Mon Sep 17 00:00:00 2001 From: "spaceBearAmadeus (Alex)" Date: Thu, 14 Nov 2024 12:25:47 -0500 Subject: [PATCH] update data generator for float handling --- worker/data_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/data_generator.py b/worker/data_generator.py index 6dc1ed71b..b40822173 100644 --- a/worker/data_generator.py +++ b/worker/data_generator.py @@ -219,12 +219,12 @@ def run_readdy( for config in species_config: for species_name, species_difc in config.items(): species_names.append(species_name) - system.add_species(species_name, species_difc) + system.add_species(species_name, float(species_difc)) # add reactions via spec for config in reactions_config: for reaction_scheme, reaction_rate in config.items(): - system.reactions.add(reaction_scheme, reaction_rate) + system.reactions.add(reaction_scheme, float(reaction_rate)) # configure simulation outputs simulation = system.simulation(kernel="CPU") @@ -241,7 +241,7 @@ def run_readdy( ) # run simulation for given time parameters - n_steps = int(duration / dt) + n_steps = int(float(duration) / dt) simulation.run(n_steps=n_steps, timestep=dt) output = {"results_file": simulation.output_file} else: