fix one more

This commit is contained in:
Adeeb Shihadeh 2024-08-28 13:15:11 -07:00
parent 90c891fe89
commit 66926771e0
1 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,8 @@ def gen_code(folder, name, f_sym, dt_sym, x_sym, obs_eqs, dim_x, dim_err, eskf_p
# merge code blocks
header += "}"
code = "\n".join([pre_code, code, open(os.path.join(TEMPLATE_DIR, "ekf_c.c"), encoding='utf-8').read(), post_code])
with open(os.path.join(TEMPLATE_DIR, "ekf_c.c"), encoding='utf-8') as f:
code = "\n".join([pre_code, code, f.read(), post_code])
# write to file
if not os.path.exists(folder):