What is the best way to enlarge a numpy 1D array and fill the new space with the last value.
F.e.
a = [1,2,3] ... enlarge ..to size 5 ... a = [1,2,3