Fix swap_axes under PyQT