I want to generate a list of N numbers in a set range, e.g. from 0 to 10. However, rather than having them evenly spaced out, I want to find an approach where the majority of newly generated values will be situated around a specific point between 0 and 10. For example either around one of the endpoints or around 8.5.
I tried doing so with numpy using numpy.logspace
and numpy.linspace
. numpy.linspace
as expected returned the numbers evenly spaced, numpy.logspace
and got back a skewed range, but all values are in a certain base (default is 10) if I log the resulting array like so:
numpy.log10(numpy.logspace(0,10)
I get evenly-spaced numbers once again. One approach can be setting a distribution for numbers to fall into but I am not sure how to do it.