xg, yg, zg = np.mgrid[0:1:50 * 1j, 0:1:50 * 1j, 0:1:50 * 1j]
f = sp.sin(x) * sp.cos(y) * sp.sin(z)
ft = theano_function([x, y, z], [f], dims={x: 3, y: 3, z: 3})
ft(xg, yg, zg)
How to get a fast lambda function from an sympy expression in 3 dimensions?