def arg_to_array(func):
 def fn(self, arg, *args, **kwargs):
  'Function\n\n        Parameters\n        ----------\n        arg : array-like\n            Argument to convert.\n        *args : tuple\n            Arguments.\n        **kwargs : dict\n            Keyword arguments.\n\n        Returns\n        -------\n        value : object\n            The return value of the function.\n        '
  return func(self, np.array(arg), *args, **kwargs)
 return fn

def arg_to_array ( func ) : def fn ( self , arg , * args , ** kwargs ) : return func ( self , np . array ( arg ) , * args , ** kwargs ) return fn
decorator to convert argument to array .