NumPy - Array Manipulation
Given a 3D array
arr with shape (1, 4, 1), you want to add a new axis at the end and then remove all size 1 axes. Which sequence of operations achieves this?