Skip to main content
4 events
when toggle format what by license comment
Oct 10, 2015 at 9:09 comment added Janne Karila @ChrisG See edit, and do read up on NumPy. It can give huge speedups for this type of code.
Oct 10, 2015 at 9:01 history edited Janne Karila CC BY-SA 3.0
added 613 characters in body
Oct 9, 2015 at 18:47 comment added ChrisG Yes you've got a point that this is not truly Kadane's algorithm but I named it so for lack of a better name, and because I got the idea of how to compute the sum from said algorithm. Other than that could you elaborate a little more how would cumsum() make things better? Wouldn't it recalculate previously calculated sums? (something that I get around using the for loop, subtracting the first element and adding the next one).
Oct 9, 2015 at 18:26 history answered Janne Karila CC BY-SA 3.0