

def check_input_with_sparse_random_matrix(random_matrix):
    (n_components, n_features) = (5, 10)
    for density in [(- 1.0), 0.0, 1.1]:
        assert_raises(ValueError, random_matrix, n_components, n_features, density=density)

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