(key,
            shape,
            dtype=tf_np.random.DEFAULT_RANDN_DTYPE,
            minval=0.,
            maxval=1.)
return tf_np.asarray(
      tf.random.stateless_uniform(
          shape, seed=_key2seed(key), dtype=dtype, minval=minval,
          maxval=maxval))
Sample uniform random values in range [`minval`, `maxval`).

  Args:
    key: the RNG key.
    shape: the shape of the result.
    dtype: the dtype of the result.
    minval: the minimal value (inclusive).
    maxval: the maximal value (exclusive).

  Returns:
    An ndarray with shape `shape` and dtype `dtype`. Each value in the ndarray
    is sampled uniformly randomly in range [`minval`, `maxval`).
Sample uniform random values in range [`minval`, `maxval`).
Sample uniform random values in range [ minval maxval ) .
def uniform(key,
            shape,
            dtype=tf_np.random.DEFAULT_RANDN_DTYPE,
            minval=0.,
            maxval=1.):
  """Sample uniform random values in range [`minval`, `maxval`).

  Args:
    key: the RNG key.
    shape: the shape of the result.
    dtype: the dtype of the result.
    minval: the minimal value (inclusive).
    maxval: the maximal value (exclusive).

  Returns:
    An ndarray with shape `shape` and dtype `dtype`. Each value in the ndarray
    is sampled uniformly randomly in range [`minval`, `maxval`).
  """
  minval = tf.cast(minval, dtype)
  maxval = tf.cast(maxval, dtype)
  key = tf_np.asarray(key, dtype=_RNG_KEY_DTYPE)
  return tf_np.asarray(
      tf.random.stateless_uniform(
          shape, seed=_key2seed(key), dtype=dtype, minval=minval,
          maxval=maxval))
def uniform ( key , shape , dtype = tf_np . random . DEFAULT_RANDN_DTYPE , minval = 0. , maxval = 1. ) : minval = tf . cast ( minval , dtype ) maxval = tf . cast ( maxval , dtype ) key = tf_np . asarray ( key , dtype = _RNG_KEY_DTYPE ) return tf_np . asarray ( tf . random . stateless_uniform ( shape , seed = _key2seed ( key ) , dtype = dtype , minval = minval , maxval = maxval ) )