

def check_zero_mean_and_unit_norm(random_matrix):
    A = densify(random_matrix(10000, 1, random_state=0))
    assert_array_almost_equal(0, np.mean(A), 3)
    assert_array_almost_equal(1.0, np.linalg.norm(A), 1)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/tests/test_random_projection.py check_zero_mean_and_unit_norm/original