Skip to contents

generate random uniform numbers in [0, 1)

Sample from a uniform distribution in the open interval (lower, upper).

Usage

nv_unif_rand(shape, initial_state, dtype = "f64")

nv_runif(shape, initial_state, dtype = "f32", lower = 0, upper = 1)

Arguments

shape

(integer())
Shape.

initial_state

([ui64[2]][tensorish])
RNG state.

dtype

(character(1) | stablehlo::TensorDataType)
Data type.

lower, upper

(numeric(1))
Lower and upper bound.

Value

(list() of tensorish)
List of two tensors: the new RNG state and the generated random numbers.