code: def logical_xor(f1, f2):  # function factory
      '''Logical xor from functions.
  
      Parameters
      ----------
      f1, f2 : function
          Function that takes array and returns true or false for each item in array.
  
      Returns
      -------
      Function
      '''
      def f_xor(arr):
          return np.logical_xor(f1(arr), f2(arr))
      f_xor.__name__ = f1.__name__ + "_xor_" + f2.__name__
      return f_xof logical_xor(f1, f2):  # function factory
      '''Logical xor from functions.
  
      Parameters
      ----------
      f1, f2 : function
          Function that takes array and returns true or false for each item in array.
  
      Returns
      -------
      Function
      '''
      def f_xor(arr):
          return np.logical_xor(f1(arr), f2(arr))
      f_xor.__name__ = f1.__name__ + "_xor_" + f2.__name__
      return f_xor
docs: Logical xor from functions.
  
      Parameters
      ----------
      f1, f2 : function
          Function that takes array and returns true or false for each item in array.
  
      Returns
      -------
      Function