Proposed solution using tensorflow described in: https://github.com/pymc-devs/pytensor/issues/256