def test_pairwise_distances_argmin_min(X_blobs):
    centers = X_blobs[::100].compute()
    working_memory = (float((80 * 500)) / (2 ** 20))
    ctx = sklearn.config_context(working_memory=working_memory)
    with ctx:
        (a_, b_) = sklearn.metrics.pairwise_distances_argmin_min(X_blobs.compute(), centers)
        (a, b) = dask_ml.metrics.pairwise_distances_argmin_min(X_blobs, centers)
        (a, b) = dask.compute(a, b)
    npt.assert_array_equal(a, a_)
    npt.assert_array_equal(b, b_)
def test_pairwise_distances_argmin_min(X_blobs):
    centers = X_blobs[::100].compute()
    working_memory = (float((80 * 500)) / (2 ** 20))
    ctx = sklearn.config_context(working_memory=working_memory)
    with ctx:
        (a_, b_) = sklearn.metrics.pairwise_distances_argmin_min(X_blobs.compute(), centers)
        (a, b) = dask_ml.metrics.pairwise_distances_argmin_min(X_blobs, centers)
        (a, b) = dask.compute(a, b)
    npt.assert_array_equal(a, a_)
    npt.assert_array_equal(b, b_)