On 5/1/07, John Washakie <[EMAIL PROTECTED]> wrote:
Oops, I meant it crashes at line 7.. > > 1) tinit = data[0][0] > 2) for d in data: > 3) if d[0] <= tinit+60: > 4) sum = sum+d > 5) else: > 6) avg = sum/len(sum) > 7) newData = append([newData],[avg],axis=0) > 8) tinit = d[0] >
You didn't include your append() function here, so it's hard to tell whats going on. Perhaps you mean to use newData.append(avg) assuming that newData is a list? Also, your average looks funky. If sum is something you can get a len() on, you can't divide it. It should be bombing here.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor