From 2f305637d39019bde337a4088ade95ef2810adab Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 7 Dec 2012 20:02:58 -0500 Subject: [PATCH] rephrase a tracer.py loop so that it uses more than one line of code so that I can trace my error more accurately --- algopy/tracer/tracer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/algopy/tracer/tracer.py b/algopy/tracer/tracer.py index 1880981..8128de5 100644 --- a/algopy/tracer/tracer.py +++ b/algopy/tracer/tracer.py @@ -246,7 +246,10 @@ def f(x1, x2): else: x_list = [x] - utpm_x_list = [algopy.UTPM(numpy.asarray(xi).reshape((1,1) + numpy.shape(xi))) for xi in x_list] + utpm_x_list = [] + for xi in x_list: + element = numpy.asarray(xi).reshape((1,1) + numpy.shape(xi)) + utpm_x_list.append(algopy.UTPM(element)) self.pushforward(utpm_x_list)