Simple example: I got a list called 'mylist' and I want to accumulate the numbers inside and save them into a new list called 'mylist_accum'.
import numpy
mylist = [1,2,3,4,5]
print mylist
mylist_accum = numpy.add.accumulate(mylist)
print mylist_accum
My prints look like this:
[1, 2, 3, 4, 5]
[ 1 3 6 10 15]
And I want them to look like this:
[1, 2, 3, 4, 5]
[1, 3, 6, 10, 15]
I need my accumulated listelements to be seperated by commas. Otherwise Matplotlib cant work with them.