Numpy has some routines like np.linspace
that creates an array of evenly spaced numbers.
Is there a similar way to generate non-evenly spaced numbers that follow a specific distribution like the normal or beta distribution? I know that there are lots of functions that can create a random sample, but I am looking for a deterministic set of values that fit a distribution.
For example, like this:
arange_normal(n=10, mean=10, std=1)
[1, 5, 8, 9, 10, 10, 11, 12, 15, 19]
The numbers here are guessed, but the idea is that they would give a perfect fit for the specified distribution. Similarly, I would also be looking for something like arange_beta
.