docs: def xarrayfunc(func):
      """Make a function compatible with xarray.DataArray.
  
      This function is intended to be used as a decorator like::
  
          >>> @dc.xarrayfunc
          >>> def func(array):
          ...     # do something
          ...     return newarray
          >>>
          >>> result = func(array)
  
      Args:
          func (function): Function to be wrapped. The first argument
              of the function must be an array to be processed.
  
      Returns:
          wrapper (function): Wrapped function.
      """
      @wraps(func)
      def wrapper(*args, **kwargs):
          if any(isinstance(arg, xr.DataArray) for arg in args):
              newargs = []
              for arg in args:
                  if isinstance(arg, xr.DataArray):
                      newargs.append(arg.values)
                  else:
                      newargs.append(arg)
  
              return dc.full_like(args[0], func(*newargs, **kwargs))
          else:
              return func(*args, **kwargs)
  
      return wrapper