BUG: edge case where the covariance matrix is exactly zero

Closes https://github.com/scipy/scipy/issues/3837.