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)
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)
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)
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)
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)
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)