# mlx.core.random.normal — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.random.normal

mlx.core.random.normal(shape: List[ int ] = [], dtype: Optional[ Dtype ] = mlx.core.float32, key: Optional[ array ] = None, stream: Union[ None , Stream , Device ] = None) → array

  Generate normally distributed random numbers.

  Parameters:

    - shape (list ( int ), optional) – Shape of the output. Default is `()`.

    - dtype (Dtype , optional) – Type of the output. Default is `float32`.

    - key (array , optional) – A PRNG key. Default: None.

  Returns:

    The output array of random values.

  Return type:

    array