how to remove the shape of the last part of the numpy array code example Example: exclude last value of an array python my_array=np.arange(10) my_array[:-1]