I have a numpy array P with size (N,M), where each row is a discrete probability distribution over 0, ..., M -1 (i.e. each row sums to one
P
(N,M)
0, ..., M -1