Produtory of a function

2

Hello, I would like to know if there is any command to perform the production of a function in Python. I'm creating a function to make the production of another function.

def fx(a, v, t):
    return ( (t[3]/exp(t[2]-(t[1]/v)))*(a/exp(t[2]-(t[1]/v)))^(t[3]-1)*exp(-(a/exp(t[2]-(t[1]/v)))^t[3]) )

def L(x, v, t):
    return (numpy.prod(fx(a=A,v=V,t)) )
    
asked by anonymous 22.11.2015 / 12:36

1 answer

0

Try the following:

from functools import reduce # caso utilizes python 3
import operator

reduce(operator.mul, (2, 3, 4), 1)

Being 2, 3 and 4 the numbers to be multiplied. A similar response can be seen here .

    
22.11.2015 / 15:48