예제 #1
0
def test_prune_sparse():
    source = csc_matrix(test_matrices[4][0])
    target = np.matrix(test_matrices[4][1])

    pruned = mc.prune(source, 1).todense()
    assert np.array_equal(pruned, target)
예제 #2
0
def test_prune():
    source = np.matrix(test_matrices[4][0])
    target = np.matrix(test_matrices[4][1])

    pruned = mc.prune(source, 1)
    assert np.array_equal(pruned, target)