

def test_too_many_samples_to_find_a_safe_embedding():
    (data, _) = make_sparse_random_data(1000, 100, 1000)
    for RandomProjection in all_RandomProjection:
        rp = RandomProjection(n_components='auto', eps=0.1)
        expected_msg = 'eps=0.100000 and n_samples=1000 lead to a target dimension of 5920 which is larger than the original space with n_features=100'
        assert_raise_message(ValueError, expected_msg, rp.fit, expected_msg)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/tests/test_random_projection.py test_too_many_samples_to_find_a_safe_embedding/VarMisuse@58/141 `data`->`expected_msg`