randint#

sionna.phy.utils.randint(low: int, high: int, size: Sequence[int], *, dtype: torch.dtype | None = None, device: str | torch.device | None = None, generator: torch._C.Generator | None = None) torch.Tensor[source]#

Generate random integer tensor, compile-aware.

In eager mode, uses the provided generator for reproducibility. In compiled mode, uses global RNG state for graph fusion.

Parameters:
  • low (int) – Minimum value (inclusive).

  • high (int) – Maximum value (exclusive).

  • size (Sequence[int]) – Shape of the output tensor.

  • dtype (torch.dtype | None) – Data type of the output tensor.

  • device (str | torch.device | None) – Device for the output tensor.

  • generator (torch._C.Generator | None) – Random number generator (used only in eager mode).

Outputs:

samples – Tensor with random integer values.