@pytest.mark.parametrize('kernel', ['linear', 'polynomial', 'rbf', 'sigmoid'])
def test_pairwise_kernels(kernel):
    X = da.random.uniform(size=(100, 4), chunks=(50, 4))
    a = dask_ml.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS[kernel]
    b = sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS[kernel]
    r1 = a(X)
    r2 = b(X.compute())
    assert isinstance(X, da.Array)
    assert_eq(r1, r2)
@pytest.mark.parametrize('kernel', ['linear', 'polynomial', 'rbf', 'sigmoid'])
def test_pairwise_kernels(kernel):
    X = da.random.uniform(size=(100, 4), chunks=(50, 4))
    a = dask_ml.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS[kernel]
    b = sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS[kernel]
    r1 = a(X)
    r2 = b(X.compute())
    assert isinstance(X, da.Array)
    assert_eq(r1, r2)