scipy/scipy — pull request #417 by newville (2013-02-05 03:55:26+00:00)
Title: optimize.leastsq should allow for ValueError when inverting curvature matrix

optimize.leastsq should allow for ValueError as well as LinAlgError when inverting curvature matrix. That is, the code around line 413 should read
try:
cov_x = inv(dot(transpose(R),R))
except (LinAlgError, ValueError):
pass