escline/linefit — pull request #2 by thisisbrians (2014-07-09 20:29:31+00:00)
Title: 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.