How to approach first and last element of one dimensional numpy array in python? : <p>I have a 1 dimensional numpy array. I don't have any information about its first and last element. I want to do slicing. Is there any other way to approach first and last element rather than the following method?<br>
    <code>a= np.arange(100).reshape(10,10)
    b= a.reshape(-1)
    even = b[b[0]:b[len(b):2]]
    odd = b[b[1]:b[len(b)]:2]</code></p>
