`np.random.choice(n_classes, n, replace=False, p=p_c)` is apparently the answer; New in version 1.7.0.