'Remove an axis from the WCS.
Parameters
wcs : `~astropy.wcs.WCS`
The WCS with naxis to be chopped to naxis-1
dropax : int
The index of the WCS to drop, counting from 0 (i.e., python convention,
not FITS convention)
Returns
A new `~astropy.wcs.WCS` instance with one axis fewer'

def dropaxis(self, dropax):

    inds = list(range(self.wcs.naxis))
    inds.pop(dropax)
    return self.sub([(i + 1) for i in inds])
