Skip to main content

uniform

Function uniform 

Source
pub fn uniform(
    low: f64,
    high: f64,
    shape: &[usize],
    dtype: DType,
    key: Option<&Array>,
) -> Result<Array>
Expand description

Uniform samples in [low, high) of shape and floating-point dtype (float16, bfloat16 or float32), as MLX: 32 random bits divided by u32::MAX, clamped below 1.