The main difference is that scipy.stats.randint allows scipy.stats.randint to explicitly specify the lower or upper probability of the tail, as well as determine the distributions from which you want to get random ints (see the scipy.stats.randint methods section of the documentation). Therefore, it is much more useful if you want to draw random intervals from a given density function.
If you really want to draw a random integer that falls within a certain range, without any distribution requirements, then numpy.random.randint is simpler. They will be drawn directly from a discrete uniform distribution, with no built-in option to change this.
sacul source share