I realised that np.power(a, b) is slower than np.exp(b * np.log(a)):
np.power(a, b)
np.exp(b * np.log(a))
import numpy as np a, b = np.random.random((2, 100000)) %timeit np