I need to calculate the correlation of two functions in Python
In R, I'd do:
g = function(x) {exp(-0.326723067*x)*cos(0.36002998837*x)}
f = function(x) {-x+1}
cor(f(u),g(u))
What would be the equivalent way in Python? I think I'd need to evaluate the function first before calculate the correlation. Is that so?