Is there a head and tail method for Numpy array?

For a head-like function you can just slice the array using dataset[:10].

For a tail-like function you can just slice the array using dataset[-10:].

Leave a Comment