I am starting with a list of distances between points and trying to create a list of cumulative sum of their distances. The calculation I have implemented is unable to finish and begins returning null in the middle of the list. For some inputs it will fully complete and for some it will begin returning null at different points in the list. I am trying to figure out if it is some feature of my list (too large) or something else. I used the Math.Round thinking it would reduce the processing load but it doesn’t seem to make a difference.
I’ve also found that if I restart dynamo and run it again, it doesn’t fail in the exact same point every time and will sometimes even complete successfully without null values.
That’s quite a lot of calculations to perform iteratively. My machine actually had a little trouble running List.Scan as well as my usual method of summing an expanded list on that many elements. Python is going to perform much better in this situation.
out = []
sum = 0
for n in IN[0]:
sum = sum + n
out.append(sum)
OUT = out