mlx_rs

Module random

Source
Expand description

Collection of functions related to random number generation

Enums§

  • Shape or count for the categorical distribution.

Functions§

  • Generate Bernoulli random values with a given p value.
  • Generate Bernoulli random values with a given p value.
  • Sample from a categorical distribution.
  • Sample from a categorical distribution.
  • Sample from the standard Gumbel distribution.
  • Sample from the standard Gumbel distribution.
  • Get a PRNG key from a seed.
  • Generate jointly-normal random samples given a mean and covariance.
  • Generate jointly-normal random samples given a mean and covariance.
  • Generate normally distributed random numbers.
  • Generate normally distributed random numbers.
  • Generate random integers from the given interval (lower: and upper:).
  • Generate random integers from the given interval (lower: and upper:).
  • Seed the random number generator.
  • Split a PRNG key into two keys and return a tuple.
  • Split a PRNG key into two keys and return a tuple.
  • Generate values from a truncated normal distribution between low and high.
  • Generate values from a truncated normal distribution between low and high.
  • Generate uniformly distributed random numbers. The values are sampled uniformly in the half-open interval [lower, upper). The lower and upper bound can be scalars or arrays and must be broadcastable to shape.
  • Generate uniformly distributed random numbers. The values are sampled uniformly in the half-open interval [lower, upper). The lower and upper bound can be scalars or arrays and must be broadcastable to shape.