class_docstr: Generalizes a function taking scalars to accept multidimensional arguments.
  
  Examples
  ========
  
  >>> from sympy import vectorize, diff, sin, symbols, Function
  >>> x, y, z = symbols('x y z')
  >>> f, g, h = list(map(Function, 'fgh'))
  
  >>> @vectorize(0)
  ... def vsin(x):
  ...     return sin(x)
  
  >>> vsin([1, x, y])
  [sin(1), sin(x), sin(y)]
  
  >>> @vectorize(0, 1)
  ... def vdiff(f, y):
  ...     return diff(f, y)
  
  >>> vdiff([f(x, y, z), g(x, y, z), h(x, y, z)], [x, y, z])
  [[Derivative(f(x, y, z), x), Derivative(f(x, y, z), y), Derivative(f(x, y, z), z)], [Derivative(g(x, y, z), x), Derivative(g(x, y, z), y), Derivative(g(x, y, z), z)], [Derivative(h(x, y, z), x), Derivative(h(x, y, z), y), Derivative(h(x, y, z), z)]]
docstr: Returns a wrapper for the one-dimensional function that can handle
  multidimensional arguments.
docstr_tok: ["Returns","a","wrapper","for","the","one-dimensional","function","that","can","handle","multidimensional","arguments","."]
code: def __call__(self, f):
      """
      Returns a wrapper for the one-dimensional function that can handle
      multidimensional arguments.
      """
  
      @wraps(f)
      def wrapper(*args, **kwargs):
          # Get arguments that should be treated multidimensional
          if self.mdargs:
              mdargs = self.mdargs
          else:
              mdargs = range(len(args)) + kwargs.keys()
  
          arglength = len(args)
  
          for n in mdargs:
              if isinstance(n, int):
                  if n >= arglength:
                      continue
                  entry = args[n]
                  is_arg = True
              elif isinstance(n, str):
                  try:
                      entry = kwargs[n]
                  except KeyError:
                      continue
                  is_arg = False
              if hasattr(entry, "__iter__"):
                  # Create now a copy of the given array and manipulate then
                  # the entries directly.
                  if is_arg:
                      args = list(args)
                      args[n] = structure_copy(entry)
                  else:
                      kwargs[n] = structure_copy(entry)
                  result = apply_on_element(wrapper, args, kwargs, n)
                  return result
          return f(*args, **kwargs)
  
      return wrapper
  
imports: from functools import wraps
label_desc: Use image node_id 2 for calling the vectorize obj's underlying member method code with example usage: obj.__call__(f) and returns: wrapper, f, result