cupynumeric.random.triangular#
- cupynumeric.random.triangular(left, mode, right, size=None)#
Draw samples from the triangular distribution over the interval
[left, right]
.The triangular distribution is a continuous probability distribution with lower limit left, peak at mode, and upper limit right. Unlike the other distributions, these parameters directly define the shape of the pdf.
- Parameters:
left (float) – Lower limit.
mode (float) – The value where the peak of the distribution occurs. The value must fulfill the condition
left <= mode <= right
.right (float) – Upper limit, must be larger than left.
size (int or tuple of ints, optional) – Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. Default is None, in which case a single value is returned.
- Returns:
out – Drawn samples from the parameterized triangular distribution.
- Return type:
ndarray or scalar
See also
- Availability:
Multiple GPUs, Multiple CPUs