What is the difference between NumPy append and concatenate?
append
concatenate
My observation is that concatenate is a bit faster and appe
appe
np.append uses np.concatenate:
np.append
np.concatenate
def append(arr, values, axis=None): arr = asanyarray(arr) if axis is None: if arr.ndim != 1: arr = arr.ravel() values = ravel(values) axis = arr.ndim-1 return concatenate((arr, values), axis=axis)