def gradient(self):
        r"""Gradient operator of the functional.

        The functional is not differentiable in ``x=0``. However, when
        evaluating the gradient operator in this point it will return 0.

         Notes
        -----
        The gradient is given by

        .. math::
            \left[ \nabla \| \|f\|_1 \|_1 \right]_i =
            \frac{f_i}{|f_i|}

        .. math::
            \left[ \nabla \| \|f\|_2 \|_1 \right]_i =
            \frac{f_i}{\|f\|_2}

        else:

        .. math::
            \left[ \nabla || ||f||_p ||_1 \right]_i =
            \frac{| f_i |^{p-2} f_i}{||f||_p^{p-1}}
        """
        functional = self

        class GroupL1Gradient(Operator):

            """The gradient operator of the `GroupL1Norm` functional."""

            def __init__(self):
                """Initialize a new instance."""
                super(GroupL1Gradient, self).__init__(
                    functional.domain, functional.domain, linear=False)

            def _call(self, x, out):
                """Return ``self(x)``."""
                pwnorm_x = functional.pointwise_norm(x)
                pwnorm_x.ufuncs.sign(out=pwnorm_x)
                functional.pointwise_norm.derivative(x).adjoint(pwnorm_x,
                                                                out=out)

                return out

        return GroupL1Gradient()
r"""Gradient operator of the functional.

        The functional is not differentiable in ``x=0``. However, when
        evaluating the gradient operator in this point it will return 0.

         Notes
        -----
        The gradient is given by

        .. math::
            \left[ \nabla \| \|f\|_1 \|_1 \right]_i =
            \frac{f_i}{|f_i|}

        .. math::
            \left[ \nabla \| \|f\|_2 \|_1 \right]_i =
            \frac{f_i}{\|f\|_2}

        else:

        .. math::
            \left[ \nabla || ||f||_p ||_1 \right]_i =
            \frac{| f_i |^{p-2} f_i}{||f||_p^{p-1}}