<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gauss_xminus1d(img, sigma, dim=2):
 r""" Applies a X-1D gauss to a copy of a XD image, slicing it along dim. Essentially uses `scipy.ndimage.filters.gaussian_filter`, but applies it to a dimension less than the image has. Parameters img : array_like The image to smooth. sigma : integer The sigma i.e. gaussian kernel size in pixel dim : integer The dimension along which to apply the filter. Returns ------- gauss_xminus1d : ndarray The input image ``img`` smoothed by a gaussian kernel along dimension ``dim``. """

    img = numpy.array(img, copy=False)
    return xminus1d(img, gaussian_filter, dim, sigma=sigma)