mlx.core.random.laplace#
- laplace(shape: Sequence[int] = [], dtype: Dtype | None = float32, loc: float = 0.0, scale: float = 1.0, key: array | None = None, stream: None | Stream | Device = None) array#
Sample numbers from a Laplace distribution.
- Parameters:
shape (list(int), optional) – Shape of the output. Default:
().dtype (Dtype, optional) – Type of the output. Default:
float32.loc (float, optional) – Mean of the distribution. Default:
0.0.scale (float, optional) – The scale “b” of the Laplace distribution. Default:
1.0.key (array, optional) – A PRNG key. Default:
None.
- Returns:
The output array of random values.
- Return type: