def test_theano_rng():

    rngs = [make_theano_rng(rng_or_seed=42, which_method='uniform'),
            make_theano_rng(rng_or_seed=RandomStreams(42),
                            which_method='uniform'),
            make_theano_rng(default_seed=42),
            make_theano_rng()]

    functions = [theano.function([], rng.uniform(size=(100,)))
                 for rng in rngs]

    random_numbers = functions[0]()
    equals = numpy.ones((100,))
    for function in functions[1:]:
        equal = random_numbers == function()
        equals *= equal

    assert equals.all()
Remove search options that are not valid for non-admin API/context.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/tests/test_rng.py/test_theano_rng--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/servers.py/remove_invalid_options