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)