randint_like#
- class brainstate.random.randint_like(input, low=0, high=None, *, dtype=None, key=None)#
Similar to
randint_likein torch.Returns a tensor with the same shape as Tensor
inputfilled with random integers generated uniformly betweenlow(inclusive) andhigh(exclusive).- Parameters:
input – the
sizeof 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 (
int|Array|ndarray|None) – the seed or key for the random.
- Returns:
The random data.