Fix BDCSVD condition for failing with numerical issue.

This commit is contained in:
Antonio Sanchez 2022-05-20 08:17:07 -07:00
parent a9868bd5be
commit 481a4a8c31

View File

@ -1099,7 +1099,7 @@ void BDCSVD<MatrixType, Options>::perturbCol0(const ArrayRef& col0, const ArrayR
#endif
// Avoid index out of bounds.
// Will end up setting zhat(k) = 0.
if (l == 0) {
if (i >= k && l == 0) {
m_info = NumericalIssue;
prod = 0;
break;