# tensorplay.functional.poisson Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.poisson.html ```python tensorplay.functional.poisson(input, generator=None) → Tensor ``` Returns a tensor of the same size as input with each element sampled from a Poisson distribution with rate parameter given by the corresponding element in input i.e., $$\text{out}_i \sim \text{Poisson}(\text{input}_i)$$ input must be non-negative. Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor containing the rates of the Poisson distribution Keyword Arguments: generator ([tensorplay.Generator](/docs/generated/tensorplay.Generator.html#tensorplay.Generator), optional) – a pseudorandom number generator for sampling Example: ``` >>> rates = tensorplay.rand(4, 4) * 5 # rate parameter between 0 and 5 >>> tensorplay.poisson(rates) tensor([[9., 1., 3., 5.], [8., 6., 6., 0.], [0., 4., 5., 3.], [2., 1., 4., 2.]]) ```