コード例 #1
0
ファイル: test_posdef_sym.py プロジェクト: aasensio/pymc3
def test_posdef_symmetric3():
    """ The test return 0 if the matrix has 0 eigenvalue.

    Is this correct?
    """
    data = np.array([[1., 1], [1, 1]], dtype=theano.config.floatX)
    assert mv.posdef(data) == 0
コード例 #2
0
ファイル: test_posdef_sym.py プロジェクト: xiaoxi0920/pymc3
def test_posdef_symmetric3():
    """The test return 0 if the matrix has 0 eigenvalue.

    Is this correct?
    """
    data = np.array([[1.0, 1], [1, 1]], dtype=theano.config.floatX)
    assert mv.posdef(data) == 0
コード例 #3
0
ファイル: test_posdef_sym.py プロジェクト: aasensio/pymc3
def test_posdef_symmetric1():
    data = np.array([[1., 0], [0, 1]], dtype=theano.config.floatX)
    assert mv.posdef(data) == 1
コード例 #4
0
ファイル: test_posdef_sym.py プロジェクト: aasensio/pymc3
def test_posdef_symmetric4():
    d = np.array([[1,  .99,  1],
                  [.99, 1,  .999],
                  [1,  .999, 1]], theano.config.floatX)

    assert mv.posdef(d) == 0
コード例 #5
0
ファイル: test_posdef_sym.py プロジェクト: xiaoxi0920/pymc3
def test_posdef_symmetric4():
    d = np.array([[1, 0.99, 1], [0.99, 1, 0.999], [1, 0.999, 1]],
                 theano.config.floatX)

    assert mv.posdef(d) == 0
コード例 #6
0
ファイル: test_posdef_sym.py プロジェクト: xiaoxi0920/pymc3
def test_posdef_symmetric2():
    data = np.array([[1.0, 2], [2, 1]], dtype=theano.config.floatX)
    assert mv.posdef(data) == 0
コード例 #7
0
ファイル: test_posdef_sym.py プロジェクト: zjlearn/pymc3
def test_posdef_symmetric1():
    data = np.array([[1.,0],[0,1]], dtype = theano.config.floatX)
    assert mv.posdef(data) ==1