drop 0 in np array code example Example: drop 0 in np array data = np.zeros(500) data = data[data!=0]