rand_numbers = np.random.random(5)
lowerlimit = np.array([1.5, 0, 4, 3, 2.4])
dynamicrange = np.array([12.4 - 1.5, 5 - 0, 16 - 4, 5 - 3, 8.9 - 2.4])
result = rand_numbers * dynamicrange + lowerlimit
result[1:4] = np.floor(result[1:4])
print(result)
How to create a random array in a certain range