Thank you for the answer, the notebook is very useful! I wish i found that before 
Could you get me any pointer to the theano implementation of the incomplete gamma function?
The only this that i found is hidden somewere here but to me it seems just c code without gradients and not exposed in python.
Thank you