Fix roundtripping problem

Previously integers that were present in the in input meant that all
the output values were rounded to be integers, however the type of
these was still float. This commit fixes this.