I'm trying to produce a geometric sequence, something similar to 1, 2, 4, 8...
I have the following code:
import numpy as np
lower_price = 1
upper_price = 2
total_grids = 10
grid_box = np.linspace(lower_price , upper_price, total_grids, retstep=True)
print(grid_box)
This outputs:
(array([1. , 1.11111111, 1.22222222, 1.33333333, 1.44444444,
1.55555556, 1.66666667, 1.77777778, 1.88888889, 2. ]), 0.1111111111111111)
This code creates an arithmetic, rather than a geometric sequence. How can I fix this code to produce the latter as opposed to the former?