dpnp.random.multinomial

dpnp.random.multinomial(n, pvals, size=None)[source]

Draw samples from a multinomial distribution.

For full documentation refer to numpy.random.multinomial.

Limitations

Parameter n limited with int32 max. See, numpy.iinfo(numpy.int32).max. Sum of pvals, sum(pvals) should be between (0, 1). Otherwise, numpy.random.multinomial(n, pvals, size) samples are drawn.

Examples

Throw a dice 20 times:

>>> s = dpnp.random.multinomial(20, [1/6.]*6, size=1)
>>> s.shape
(1, 6)