Hi,

I want to calculate the difference between the values of a
numpy-array. The formula is:

deltaT = t_(n+1) - t_(n)

My approach to calculate the difference looks like this:

for i in len(ARRAY):
        delta_t[i] = ARRAY[(i+1):] - ARRAY[:(len(ARRAY)-1)]

print "result:", delta_t

But I get a TypeError:
File "./test.py", line 19, in <module>
    for i in len(ARRAY):
TypeError: 'int' object is not iterable

Where is the mistake in the code?

Regards and a happy new year,
Manuel Wittchen
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to