Custom theano Op to do numerical integration

Thank you for the help! I tried the advice re trust_input.

Adding self._func.trust_input=True in __init__ right after the definition of self._func makes the kernel die when running the example in a jupyter notebook. When running the code from the command line, it raises a Segmentation fault.

Any additional ideas on how to make it faster would also be great!