Run »
import numpy as np arr = np.arange(1, 10) print(np.log2(arr))
[0. 1. 1.5849625 2. 2.32192809 2.5849625 2.80735492 3. 3.169925 ]