I'm writing tests for a pivoted QR implementation, and I noticed that CG is tested in test_iterative_singular in test_singular.py. The issue is that construct_singular_matrix does not respect tags, in particular it doesn't produce psd and nsd matrices (not even symmetric, eg). One could consider this a bug in construct_singular_matrix, but this testing of CG seems to be the only location where singular matrices respecting tags is requested.
As a secondary matter, it seems we are testing that the iterative solvers surely fail on singular inputs. Is this really a guarantee these solvers provide? Also why do we test on special case constructed matrices only in construct_singular_matrix?
I'm writing tests for a pivoted QR implementation, and I noticed that CG is tested in
test_iterative_singularintest_singular.py. The issue is thatconstruct_singular_matrixdoes not respect tags, in particular it doesn't produce psd and nsd matrices (not even symmetric, eg). One could consider this a bug inconstruct_singular_matrix, but this testing of CG seems to be the only location where singular matrices respecting tags is requested.As a secondary matter, it seems we are testing that the iterative solvers surely fail on singular inputs. Is this really a guarantee these solvers provide? Also why do we test on special case constructed matrices only in
construct_singular_matrix?