code: def _check_type(self, input_val):
          
  
          if not isinstance(input_val, (list, tuple, np.ndarray)):
              raise TypeError('Invalid input type, input must be a list, tuple '
                              'or numpy array.')
  
          input_val = np.array(input_val)
  
          if not input_val.size:
              raise ValueError('Input list is empty.')
  
          return input_val
docs: Check Input Type
  
          This method checks if the input is a list, tuple or a numpy array and
          converts the input to a numpy array
  
          Parameters
          ----------
          input_val : list, tuple or np.ndarray
  
          Returns
          -------
          np.ndarray of input
  
          Raises
          ------
          TypeError
              For invalid input type