code: def degreeDecorator(inDegrees,outDegrees):
      
      # (modified) old degree decorator
      def wrapper(func):
          @wraps(func)
          def wrapped(*args, **kwargs):
              isdeg = kwargs.get('degree', False)
              if isdeg:
                  args = [arg * nu.pi / 180 if i in inDegrees else arg
                          for i, arg in enumerate(args)]
              out = func(*args, **kwargs)
              if isdeg:
                  for i in outDegrees:
                      out[:, i] *= 180. / nu.pi
              return out
          return wrapped
      return wrapper
docs: NAME:
  
         degreeDecorator
  
      PURPOSE:
  
         Decorator to transform angles from and to degrees if necessary
  
      INPUT:
  
         inDegrees - list specifiying indices of angle arguments (e.g., [0,1])
         outDegrees - list, same as inDegrees, but for function return
  
      HISTORY:
  
         ____-__-__ - Written - Bovy
  
         2019-03-02 - speedup - Nathaniel Starkman (UofT)