From 094df0ae212a820105e3ec2c80ea2f7b82910f50 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Thu, 8 Dec 2011 11:48:38 -0500 Subject: [PATCH] Name the variation templates for debugging --- cuburn/code/variations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuburn/code/variations.py b/cuburn/code/variations.py index 4daf302..70c56d8 100644 --- a/cuburn/code/variations.py +++ b/cuburn/code/variations.py @@ -6,7 +6,7 @@ var_code = {} var_params = {} def var(num, name, code, params=None): - var_code[name] = Template(code) + var_code[name] = Template(code, name) if params is not None: r = {} for p in params.split(): @@ -25,7 +25,7 @@ def var(num, name, code, params=None): def precalc(name, code): def precalc_fun(pv): pre = pv._precalc() - pre._code(Template(code).substitute(pre=pre)) + pre._code(Template(code, name+'_precalc').substitute(pre=pre)) Template.default_namespace[name+'_precalc'] = precalc_fun # Variables note: all functions will have their weights as 'w',