I am trying to find a working alternative for numpy’s choice function.

As far as I know ndarray.sample_multinomial(…) can do the job but only with replacement. Is there a non-hacky way of doing it without replacement?

The issue below discusses the same problem but without any answer: