scipy/scipy — pull request #3122 by andrenarchy (2013-12-04 16:48:05+00:00)
Title: BUG: linalg.eig: fix division by zero

The current implementation of the generalized eigenvalue problem raises a `RuntimeWarning` (division by zero) if the left eigenvectors are not requested:
```
File "/tmp/scipy/build/testenv/lib/python2.7/site-packages/scipy/linalg/decomp.py", line 79, in _geneig
vl[:, i] /= norm(vl[:, i])
RuntimeWarning: invalid value encountered in true_divide
```
This commit fixes only normalizes the eigenvectors if they have actually been computed.