tensor/scalar theano function
support Rationals in theano printing
dim_handling supports alternative keys
theano prints integers as python ints