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 (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – thesizeof input will determine size of the output tensor.low (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Lowest integer to be drawn from the distribution. Default: 0.high (
Array|ndarray|bool|number|bool|int|float|complex|Quantity|None) – One above the highest integer to be drawn from the distribution.dtype (
str|type[Any] |dtype|SupportsDType|None) – the desired data type of returned Tensor. Default: ifNone, defaults to the dtype of input.key (
int|Array|ndarray|None) – the seed or key for the random.
- Return type:
Array