def trapz2 ( f , x = None , y = None , dx = 1.0 , dy = 1.0 ) : return numpy . trapz ( numpy . trapz ( f , x = y , dx = dy ) , x = x , dx = dx )
how to trapezoidal integrate in python
Double integrate .
def trapz2(f, x=None, y=None, dx=1.0, dy=1.0):
    """Double integrate."""
    return numpy.trapz(numpy.trapz(f, x=y, dx=dy), x=x, dx=dx)