def test_jaccard_distances():
    #Idepontent Test
    X = [['a', 'b', 'c']]
    D = jaccard_coefficient(X, X)
    assert_array_almost_equal(D, [[1.]])

    #Vector x Non Vector
    X = [['a', 'b', 'c']]
    Y = [[]]
    D = jaccard_coefficient(X, Y)
    assert_array_almost_equal(D, [[0.]])

    #Vector A x Vector B
    X = [[1, 2, 3, 4]]
    Y = [[2, 3]]
    D = jaccard_coefficient(X, Y)
    assert_array_almost_equal(D, [[0.5]])

    #BUG FIX: How to fix for multi-dimm arrays

    #Vector N x 1
    X = [['a', 'b', 'c', 'd'], ['e', 'f', 'g']]
    Y = [['a', 'b', 'c', 'k']]
    D = jaccard_coefficient(X, Y)
    assert_array_almost_equal(D, [[0.6], [0.]])

    #N-Dimmensional Vectors
    X = [['a', 'b', 'c', 'd'], ['e', 'f', 'g']]
    Y = [['a', 'b', 'c', 'd'], ['e', 'f', 'g']]
    D = jaccard_coefficient(X, Y)
    assert_array_almost_equal(D, [[1., 0.], [0., 1.]])

    X = [[0, 1], [1, 2]]
    D = jaccard_coefficient(X, X)
    assert_array_almost_equal(D, [[1., 0.33333333], [0.33333333, 1.]])

    X = [[0, 1], [1, 2]]
    Y = [[0, 3]]
    D = jaccard_coefficient(X, Y)
    assert_array_almost_equal(D, [[0.33333333], [0.]])


#if __name__ == '__main__':
#    run_module_suite()
Parses parameterized_format.
dataset/ETHPy150Open muricoca/crab/scikits/crab/metrics/tests/test_pairwise.py/test_jaccard_distances--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/file_format_parser.py/_Parser._parse_parameterized_format