sloped uniform distribution python
问题 I would like to acquire values from a uniform distribution that is sloped instead of a standard uniform distribution which is drawing out values from a straight flat line of slope = 0. To be more specific, I'd like to get values from the function of the slope distribution, FIGURE 2 BELOW. I do know that for the first one, I could use numpy.random.uniform(initial,final). How can I do this for a sloped distribution? I know that multiplying a 'slope' or scaling factor to the values from the