day1/exercise/linspace.py
author nishanth
Wed, 03 Mar 2010 14:14:45 +0530
changeset 375 30124fd5eb7e
parent 64 333092b68926
permissions -rw-r--r--
added the missing question mark

def linspace(a, b, N):
    lns = []
    step = (float(b) - float(a)) / float(N - 1)
    print step
    for i in range(N):
        lns.append(a + i*step)

    return lns

print linspace(0, 5, 11)