<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GTax(x, ax):
 """ Compute transpose of gradient of `x` along axis `ax`. Parameters x : array_like Input array ax : int Axis on which gradient transpose is to be computed Returns ------- xg : ndarray Output array """


    slc0 = (slice(None),) * ax
    xg = np.roll(x, 1, axis=ax) - x
    xg[slc0 + (slice(0, 1),)] = -x[slc0 + (slice(0, 1),)]
    xg[slc0 + (slice(-1, None),)] = x[slc0 + (slice(-2, -1),)]
    return xg