@jiahao I agree there are cases (e.g. matrices that are nearly singular) where this can become really tricky. For such cases, setting a magic seed is a reasonable stopgap.

However, I think it is still worth considering better ways of setting up those tests.