Suppose we have the following array:
import numpy as np
a = np.arange(1, 10)
a = a.reshape(len(a), 1)
array([[1],
       [2],
       [3],
       [4],
       [5],
       [6],
       [7],
       [8],
       [9]])
Now, i want to access the elements from index 4 to the end:
a[3:-1]
array([[4],
       [5],
       [6],
       [7],
       [8]])
 
When i do this, the resulting vector is missing the last element, now there are five elements instead of six, why does it happen, and how can i get the last element without appending it?
Expected output:
array([[4],
       [5],
       [6],
       [7],
       [8],
       [9]])
 
     
     
    