prevent scaling factor from being 0 when weights are integers.

Thanks for this gem—it's been very helpful to us!

I kept getting "Can't fit line when x values are all equal", and realized it was because all of my weights were integers. This is just a tiny tweak so that integer weights don't cause the scaling factor to be zero.