Your matrix probably is very ill-conditioned that the underlying lapack operation couldn’t converge. You can try to catch that error and print the input in that case and see what the matrix looks like exactly.