Tweeted By @python_tip
#Numpy append is slow because it creates a copy. See running times of appending 10,000 values from https://t.co/A7EdFeD8ou:
— Daily Python Tip (@python_tip) December 18, 2018
* list.append: 0.0015
* deque.append: 0.0014
* np.append: 0.05
If possible, it is better to allocate the array beforehand. Example: https://t.co/RWo0BmlJZ6