convert Inf to np.inf

Previously, `Inf` would pass through unaltered.

Note that this only applies to the `Inf` constant, and not the `inf` function.