add gibbs sampling equation
change nparray.nonzero() to nparray.argmax() to get a sample from multinomial