It is limited to integer weights only to make it easy to verify that the algorithm implements the requested distribution exactly. (See the test file in the same directory.)
You could probably restrict to rational numbers, and still verify? Languages like Python, Haskell, Rust etc have good support for arbitrary length rational numbers.
Each floating point number is also a rational number, and thus you could then restrict again to floating point afterwards.
Each floating point number is also a rational number, and thus you could then restrict again to floating point afterwards.