def cumulative_sum(points):
    """
    Returns the cumulative sum.
    """
    # logger.info('calculating cumulative sum')
    csum = [0,]
    prev = 0
    # logger.info('start appending points')
    for p in points:
        csum.append(p+prev)
        prev = p+prev
    # logger.info('returning sum')
    return csum