예제 #1
0
def test_aampdist(T_A, T_B):
    m = 3
    for p in [1.0, 2.0, 3.0]:
        ref_mpdist = naive.aampdist(T_A, T_B, m, p=p)
        comp_mpdist = aampdist(T_A, T_B, m, p=p)

        npt.assert_almost_equal(ref_mpdist, comp_mpdist)
예제 #2
0
def test_aampdisted(T_A, T_B, dask_cluster):
    with Client(dask_cluster) as dask_client:
        m = 3
        ref_mpdist = naive.aampdist(T_A, T_B, m)
        comp_mpdist = aampdisted(dask_client, T_A, T_B, m)

        npt.assert_almost_equal(ref_mpdist, comp_mpdist)
예제 #3
0
def test_aampdisted(T_A, T_B, dask_cluster):
    with Client(dask_cluster) as dask_client:
        m = 3
        for p in [1.0, 2.0, 3.0]:
            ref_mpdist = naive.aampdist(T_A, T_B, m, p=p)
            comp_mpdist = aampdisted(dask_client, T_A, T_B, m, p=p)

            npt.assert_almost_equal(ref_mpdist, comp_mpdist)
예제 #4
0
def test_aampdist_k(T_A, T_B, k):
    m = 3
    ref_mpdist = naive.aampdist(T_A, T_B, m, k=k)
    comp_mpdist = aampdist(T_A, T_B, m, k=k)

    npt.assert_almost_equal(ref_mpdist, comp_mpdist)
예제 #5
0
def test_aampdist_percentage(T_A, T_B, percentage):
    m = 3
    ref_mpdist = naive.aampdist(T_A, T_B, m, percentage=percentage)
    comp_mpdist = aampdist(T_A, T_B, m, percentage=percentage)

    npt.assert_almost_equal(ref_mpdist, comp_mpdist)
예제 #6
0
def test_gpu_aampdist(T_A, T_B):
    m = 3
    ref_mpdist = naive.aampdist(T_A, T_B, m)
    comp_mpdist = gpu_aampdist(T_A, T_B, m)

    npt.assert_almost_equal(ref_mpdist, comp_mpdist)