I would like to generate an array bounded by a lower and upper value with n elements similar to:
def my_lin(lb, ub, steps):
dx = (ub-lb) / (steps-1)
return [lb + i*dx for i in range(steps)]
my_lin(0,10,11)
But I would like to have more values closer to the lower value. Some kind of harmonic spacing. I do not want to have a logarithmic spacing.
I guess it is rather simple but I cannot figure it out. Any help is highly appreciated.
EDIT:
I came up with following quick solution:
def harm_series(lb,n):
return [float(lb)/float(i) for i in range(1,n) ]