def funToVec( tgtfun, low=-1, high=1, steps=40, EqualSpacing=0 ):
    if EqualSpacing:
        h = (0.0+high-low)/steps
        xvec = [low+h/2.0+h*i for i in range(steps)]
    else:
        scale, base = (0.0+high-low)/2.0, (0.0+high+low)/2.0
        xvec = [base+scale*math.cos(((2*steps-1-2*i)*math.pi)/(2*steps)) for i in range(steps)]
    yvec = map(tgtfun, xvec)
    return Mat( [xvec, yvec] )
Compute x,y points from evaluating a target function over an interval (low to high)
dataset/ETHPy150Open sunlightlabs/clearspending/completeness/statlib/matfunc.py/funToVec