def test_euclidean_distances_same():
    X = da.random.uniform(size=(100, 4), chunks=50)
    a = dask_ml.metrics.euclidean_distances(X, X)
    b = sklearn.metrics.euclidean_distances(X, X)
    assert_eq(a, b, atol=0.0001)
    a = dask_ml.metrics.euclidean_distances(X)
    b = sklearn.metrics.euclidean_distances(X)
    assert_eq(a, b, atol=0.0001)
    x_norm_squared = (X ** 2).sum(axis=1).compute()[:, np.newaxis]
    assert_eq(X, X, Y_norm_squared=x_norm_squared, atol=0.0001)
def test_euclidean_distances_same():
    X = da.random.uniform(size=(100, 4), chunks=50)
    a = dask_ml.metrics.euclidean_distances(X, X)
    b = sklearn.metrics.euclidean_distances(X, X)
    assert_eq(a, b, atol=0.0001)
    a = dask_ml.metrics.euclidean_distances(X)
    b = sklearn.metrics.euclidean_distances(X)
    assert_eq(a, b, atol=0.0001)
    x_norm_squared = (X ** 2).sum(axis=1).compute()[:, np.newaxis]
    assert_eq(X, X, Y_norm_squared=x_norm_squared, atol=0.0001)