How to "push and shift" an element in a numpy array most efficiently?
You're describing a ring buffer.  Just use a normal NumPy array plus an integer which tells you which row is the "top."  To push, simply replace the "top" row with a new row and increment the top index.
I am trying to add a numpy array x = [1,2,3,4] to "the end" of a numpy array of shape (n,4) (i.e. "push" x onto the array) while removing the first element (i.e. "shift" the array). So basically, after adding my array x, the (4) shaped array that was added last should be removed.
How does one do this in the computationally most efficient manner?