scikit-learn/scikit-learn — pull request #1148 by yarikoptic (2012-09-14 13:41:12+00:00)
Title: BF: lars -- assure quiting the loop in a degenerate case before crashing

if data is entirely degenerate (e.g. all Xs are 0s), then loop would eventually crash
due to:

TypeError: unsupported operand type(s) for *: long and numpy.float64

when i=63. swapping product order in (2 ** i) * eps would allow to loop until 1023
but most probably with the same "success". Thus it should be as sensible to quit
loop before crashing with a TypeError