cupy.random.multinomial#
- cupy.random.multinomial(n, pvals, size=None)[source]#
Returns an array from multinomial distribution.
- Parameters:
n (int) – Number of trials.
pvals (cupy.ndarray) – Probabilities of each of the
p
different outcomes. The sum of these values must be 1.size (int or tuple of ints or None) – Shape of a sample in each trial. For example when
size
is(a, b)
, shape of returned value is(a, b, p)
wherep
islen(pvals)
. Ifsize
isNone
, it is treated as()
. So, shape of returned value is(p,)
.
- Returns:
An array drawn from multinomial distribution.
- Return type:
Note
It does not support
sum(pvals) < 1
case.See also
numpy.random.multinomial()