def test_SVD ( pca ) : _ = pca rec = N . dot ( _ . U , N . dot ( _ . sigma , _ . V ) ) assert N . allclose ( _ . arr , rec )
python svd failing because of numpy dependcies
Function to test the validity of singular value decomposition by reconstructing original data .
def test_SVD(pca):
    """
    Function to test the validity of singular
    value decomposition by reconstructing original
    data.
    """
    _ = pca
    rec = N.dot(_.U,N.dot(_.sigma,_.V))
    assert N.allclose(_.arr,rec)