code: def test_vector_arguments(self):
      random = RandomStreams(utt.fetch_seed())
      low = tensor.dvector()
      out = random.uniform(low=low, high=1)
      assert out.ndim == 1
      f = function([low], out)
  
      seed_gen = np.random.RandomState(utt.fetch_seed())
      numpy_rng = np.random.RandomState(int(seed_gen.randint(2**30)))
      val0 = f([-5, 0.5, 0, 1])
      val1 = f([0.9])
      numpy_val0 = numpy_rng.uniform(low=[-5, 0.5, 0, 1], high=1)
      numpy_val1 = numpy_rng.uniform(low=[0.9], high=1)
      assert np.all(val0 == numpy_val0)
      assert np.all(val1 == numpy_val1)
  
      high = tensor.vector()
      outb = random.uniform(low=low, high=high)
      assert outb.ndim == 1
      fb = function([low, high], outb)
  
      numpy_rng = np.random.RandomState(int(seed_gen.randint(2**30)))
      val0b = fb([-4.0, -2], [-1, 0])
      val1b = fb([-4.0], [-1])
      numpy_val0b = numpy_rng.uniform(low=[-4.0, -2], high=[-1, 0])
      numpy_val1b = numpy_rng.uniform(low=[-4.0], high=[-1])
      assert np.all(val0b == numpy_val0b)
      assert np.all(val1b == numpy_val1b)
      self.assertRaises(ValueError, fb, [-4.0, -2], [-1, 0, 1])
      # TODO: do we want that?
      # self.assertRaises(ValueError, fb, [-4., -2], [-1])
  
      size = tensor.lvector()
      outc = random.uniform(low=low, high=high, size=size, ndim=1)
      fc = function([low, high, size], outc)
  
      numpy_rng = np.random.RandomState(int(seed_gen.randint(2**30)))
      val0c = fc([-4.0, -2], [-1, 0], [2])
      val1c = fc([-4.0], [-1], [1])
      numpy_val0c = numpy_rng.uniform(low=[-4.0, -2], high=[-1, 0])
      numpy_val1c = numpy_rng.uniform(low=[-4.0], high=[-1])
      assert np.all(val0c == numpy_val0c)
      assert np.all(val1c == numpy_val1c)
      # self.assertRaises(ValueError, fc, [-4., -2], [-1, 0], [1])
      self.assertRaises(ValueError, fc, [-4.0, -2], [-1, 0], [1, 2])
      self.assertRaises(ValueError, fc, [-4.0, -2], [-1, 0], [2, 1])
  
imports: from __future__ import absolute_import, print_function, division
  import sys
  import unittest
  import numpy
  from theano.tensor import raw_random
  from theano.tensor.shared_randomstreams import RandomStreams
  from theano import function, shared
  from theano import tensor
  from theano import compile, config, gof
  from theano.tests import unittest_tools
label_desc: Use image node_id 21 for calling the T_SharedRandomStreams obj's underlying member method code with example usage: obj.test_vector_arguments() without return types