# HG changeset patch # User John W. Eaton # Date 1682616301 14400 # Node ID 3b9305e62bb77ee6ace0fbef6c518e37fdab530a # Parent ada96a467a28664b089a3f68c9e808528ce835c4 avoid LU warnings in sparse tests (bug #64117) * mk-sparse-tst.sh: Avoid warnings from LU in sparse tests. diff -r ada96a467a28 -r 3b9305e62bb7 test/mk-sparse-tst.sh --- a/test/mk-sparse-tst.sh Wed Apr 26 17:18:50 2023 -0400 +++ b/test/mk-sparse-tst.sh Thu Apr 27 13:25:01 2023 -0400 @@ -653,19 +653,35 @@ %! assert(det(bs+speye(size(bs))), det(bf+eye(size(bf))), 100*eps*abs(det(bf+eye(size(bf))))); %!testif HAVE_UMFPACK +%! ## Yes, we want to test lu with fewer than 4 output arguments +%! ## and sparse input while also avoiding the warning. So use +%! ## warning ("off", ...) insetead of additional outputs. +%! warning ("off", "Octave:lu:sparse_input", "local"); %! [l,u] = lu (sparse ([1,1;1,1])); %! assert (l*u, [1,1;1,1], 10*eps); %!testif HAVE_UMFPACK +%! ## Yes, we want to test lu with fewer than 4 output arguments +%! ## and sparse input while also avoiding the warning. So use +%! ## warning ("off", ...) insetead of additional outputs. +%! warning ("off", "Octave:lu:sparse_input", "local"); %! [l,u] = lu (sparse ([1,1;1,1+i])); %! assert (l, sparse ([1,2,2],[1,1,2],1), 10*eps); %! assert (u, sparse ([1,1,2],[1,2,2],[1,1,1i]), 10*eps); %!testif HAVE_UMFPACK # permuted LU +%! ## Yes, we want to test lu with fewer than 4 output arguments +%! ## and sparse input while also avoiding the warning. So use +%! ## warning ("off", ...) insetead of additional outputs. +%! warning ("off", "Octave:lu:sparse_input", "local"); %! [L,U] = lu (bs); %! assert (L*U, bs, 1e-10); %!testif HAVE_UMFPACK # simple LU + row permutations +%! ## Yes, we want to test lu with fewer than 4 output arguments +%! ## and sparse input while also avoiding the warning. So use +%! ## warning ("off", ...) insetead of additional outputs. +%! warning ("off", "Octave:lu:sparse_input", "local"); %! [L,U,P] = lu (bs); %! assert (P'*L*U, bs, 1e-10); %! ## triangularity @@ -766,10 +782,18 @@ gen_matrixreshape_tests cat <