def sampling(self, ufunc, **kwargs):
        """Sample a continuous function and assign to this element.

        Parameters
        ----------
        ufunc : ``self.space.fspace`` element
            The continuous function that should be samplingicted.
        kwargs :
            Additional arugments for the sampling operator implementation

        Examples
        --------
        >>> space = odl.uniform_discr(0, 1, 5)
        >>> x = space.element()

        Assign x according to a continuous function:

        >>> x.sampling(lambda t: t)
        >>> x  # Print values at grid points (which are centered)
        uniform_discr(0.0, 1.0, 5).element([ 0.1,  0.3,  0.5,  0.7,  0.9])

        See Also
        --------
        DiscretizedSpace.sampling : For full description
        """
        self.space.sampling(ufunc, out=self.tensor, **kwargs)