code: def scalarDecorator(func):
      
      @wraps(func)
      def scalar_wrapper(*args,**kwargs):
          if nu.array(args[0]).shape == ():
              scalarOut= True
              newargs= ()
              for ii in range(len(args)):
                  newargs= newargs+(nu.array([args[ii]]),)
              args= newargs
          else:
              scalarOut= False
          result= func(*args,**kwargs)
          if scalarOut:
              out= ()
              for ii in range(result.shape[1]):
                  out= out+(result[0,ii],)
              return out
          else:
              return result
      return scalar_wrapper
docs: Decorator to return scalar outputs as a set