Implementing something like tt.trapz() for numerical integration over a set domain?

Oh right. I think you might be able to change the quad integrator in the post with scipy.integrate.trapz - maybe you can give this a try?