'Weibull weighted randomization in Python

How to use Weibull function to generate random numbers within a given range? I know there is a scipy function weibull_min.rvs(k, loc=0, scale=lam, size=n, random_state=5) that generates n number of points when given shape and scale parameters, but I want it to generate random numbers within a fixed range, not all values.

Note: the range might be a set of integers like between 2 and 3, then Generate random numbers between them that follow the Weibull distribution.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source