Exemplo n.º 1
0
def test_orthogonalize():
    """ test that the orthogonalization is OK """
    X = np.random.randn(100, 5)
    X = _orthogonalize(X)
    K = np.dot(X.T, X)
    K -= np.diag(np.diag(K))
    assert_almost_equal((K**2).sum(), 0, 15)
Exemplo n.º 2
0
def test_orthogonalize():
    """ test that the orthogonalization is OK """
    X = np.random.randn(100, 5)
    X = _orthogonalize(X)
    K = np.dot(X.T, X)
    K -= np.diag(np.diag(K))
    assert_almost_equal((K ** 2).sum(), 0, 15)
Exemplo n.º 3
0
def test_orthogonalize_trivial():
    """ test that the orthogonalization is OK """
    X = np.random.randn(100)
    Y = X.copy()
    X = _orthogonalize(X)
    assert_array_equal(Y, X)
Exemplo n.º 4
0
def test_orthogonalize_trivial():
    """ test that the orthogonalization is OK """
    X = np.random.randn(100)
    Y = X.copy()
    X = _orthogonalize(X)
    assert_array_equal(Y, X)