qit.utils.rand_pu¶
- qit.utils.rand_pu(n)¶
Random n-partition of unity.
- Parameters
n (int) – number of parts
- Returns
n-partition, i.e. a 1d array of
n
nonnegative numbers that sum up to one- Return type
array[float]
The n-partition is random with respect to the order-n Dirichlet distribution \(Dir(\alpha)\) with \(\alpha = (1, 1, ..., 1)\).