Improve performance with np.rollaxis