Skip to main content

function

rand

rand[type: DType](ptr: DTypePointer[type, 0], size: Int)

Fills memory with random values from a uniform distribution.

Parameters:

  • type (DType): The dtype of the pointer.

Args:

  • ptr (DTypePointer[type, 0]): The pointer to the memory area to fill.
  • size (Int): The number of elements to fill.