brainpy.math.random.randint_like(input, low=0, high=None, *, dtype=None, key=None)[source]#

Similar to randint_like in torch.

Returns a tensor with the same shape as Tensor input filled with random integers generated uniformly between low (inclusive) and high (exclusive).

  • input – the size of input will determine size of the output tensor.

  • low – Lowest integer to be drawn from the distribution. Default: 0.

  • high – One above the highest integer to be drawn from the distribution.

  • dtype – the desired data type of returned Tensor. Default: if None, defaults to the dtype of input.

  • key (Union[int, Array, None]) – the seed or key for the random.


The random data.