The second argument to expandDims should be a 32-bit or 64-bit integer tensor, not a 64-bit floating point tensor. Looks like we should tighten the type requirements to TIntegral from TNumber for the second argument.