Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It shouldn't be hard to implement a "float version" of range. For example

def frange(a,b,n):
    return [a+(b-a)*i/n for i in range(n)]

can get you started.

If you are not willing to implement your own version, then you can just use numpy's linspace or numpy's arange.

Whatever choice you make you can just add the values in the list using sum ... type of thing.