mlx.core.random.split

Contents

mlx.core.random.split#

split(key: array, num: int = 2, stream: None | Stream | Device = None) array#

Split a PRNG key into sub keys.

Parameters:
  • key (array) – Input key to split.

  • num (int, optional) – Number of sub keys. Default: 2.

Returns:

The array of sub keys with num as its first dimension.

Return type:

array