Get First And Last Element Of Numpy Array