Graph mapper in Python?

For example, the sin curve could be used like this:

import math
input = 10.0

def function_to_use(x):
    return math.cos(x * 0.2 + math.pi * 0.1) * 0.4 + 2.0

mapper  = function_to_use(input)
a = mapper```

Does it help?

Thanks

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com