code: def rand(*size, **kwarg):
      """Returns an array of uniform random values over the interval ``[0, 1)``.
  
      Each element of the array is uniformly distributed on the half-open
      interval ``[0, 1)``. All elements are identically and independently
      distributed (i.i.d.).
  
      Args:
          size (ints): The shape of the array.
          dtype: Data type specifier. Only :class:`numpy.float32` and
              :class:`numpy.float64` types are allowed. The default is
              :class:`numpy.float64`.
  
      Returns:
          cupy.ndarray: A random array.
  
      .. seealso:: :meth:`numpy.random.rand`
  
      .. admonition:: Example
  
         .. code-block:: python
  
            >>> cupy.random.rand(3, 2)
            array([[0.86476479, 0.05633727],   # random
                   [0.27283185, 0.38255354],   # random
                   [0.16592278, 0.75150313]])  # random
  
            >>> cupy.random.rand(3, 2, dtype=cupy.float32)
            array([[0.9672306 , 0.9590486 ],                  # random
                   [0.6851264 , 0.70457625],                  # random
                   [0.22382522, 0.36055237]], dtype=float32)  # random
  
      """
      dtype = kwarg.pop("dtype", float)
      if kwarg:
          raise TypeError(
              "rand() got unexpected keyword arguments %s"
              % ", ".join(kwarg.keys())
          )
      return random_sample(size=size, dtype=dtype)
  
file_path: cupy/cupy/random/_sample.py
imports: from cupy import _core
  from cupy._creation import basic
  from cupy.random import _distributions
  from cupy.random import _generator
label_desc: Use image node_id 1 for calling a global function with example usage: rand() and returns: random_sample