Beispiel #1
0
def test_invhess():
    """
    Simple test of invhess matrix
    This is really not a very good test, for I don't know of
    any special properties to look for.  However, it looks to
    be very poorly conditioned, so we will just look for that.
    """
    a = rogues.invhess(55)
    w, v, cond = rogues.condeig(a)
    assert((cond > 1e+14).any())
Beispiel #2
0
def test_invhess():
    """
    Simple test of invhess matrix
    This is really not a very good test, for I don't know of
    any special properties to look for.  However, it looks to
    be very poorly conditioned, so we will just look for that.
    """
    a = rogues.invhess(55)
    w, v, cond = rogues.condeig(a)
    assert ((cond > 1e+14).any())
Beispiel #3
0
def test_condeig():
    """
    Simple Test of condeig, checks (partly) results in Higham & Higham
    Note that the last two condtion numbers do _not_ match the results
    of H&H and seem exceptionally large
    """
    a = rogues.frank(6)
    gold_c = [1.30589002, 1.35605093, 2.04115713, 15.32552609, \
              43.52124194, 56.69535399]
    lr, vr, c = rogues.condeig(a)

    for i in range(6):
        npt.assert_almost_equal(c[i], gold_c[i], 6)
Beispiel #4
0
def test_dorr():
    """Simple test of dorr(10).  We actually only check to
    see if the eigenvalue condition numbers are big"""
    a = rogues.dorr(10, r_matrix=True)
    w, v, cond = rogues.condeig(a)
    assert((cond.sum() > 1e15))
Beispiel #5
0
def test_dorr():
    """Simple test of dorr(10).  We actually only check to
    see if the eigenvalue condition numbers are big"""
    a = rogues.dorr(10, r_matrix=True)
    w, v, cond = rogues.condeig(a)
    assert ((cond.sum() > 1e15))