bscottmay·2 jaar geleden·discussYeah, an all-numpy version runs in less than 1ms on my M1 air import numpy as np l = 10_000 t = np.empty(l, dtype=np.float32) j = np.arange(l) t = 0.02 \* j t *= (0.03 * j) t -= (0.04 \* j) t /= 0.05 \* (j + 1)