I am playing with the NumPy library and there is a behaviour that I do not understand:
I defined a simple vector Y:
Y = np.array([6,7,8],dtype = np.int16)
Then, I tried to add an additional element at the end of the array using the np.insert() method. I specified the position to be at -1:
Z = np.insert(Y,(-1),(19))
My element was inserted not on the last, but on the penultimate position:
Could somebody explain my why this element was not inserted at the end of my array?