Skip to main content

bernoulli

Function bernoulli 

Source
pub fn bernoulli<'a>(
    p: f64,
    shape: impl IntoShape,
    key: impl Into<Option<&'a Array>>,
) -> Array
Expand description

Booleans of shape that are true with probability p, as MLX: uniform < p.