code: def _return_result(self, result, comparison_vectors=None):
          
          return_type = cf.get_option('classification.return_type')
  
          if type(result) != np.ndarray:
              raise ValueError("numpy.ndarray expected.")
  
          # return the pandas.MultiIndex
          if return_type == 'index':
              return comparison_vectors.index[result.astype(bool)]
  
          # return a pandas.Series
          elif return_type == 'series':
              return pandas.Series(
                  result,
                  index=comparison_vectors.index,
                  name='classification')
  
          # return a numpy.ndarray
          elif return_type == 'array':
              return result
  
          # return_type not known
          else:
              raise ValueError(
                  "return_type {} unknown. Choose 'index', 'series' or "
                  "'array'".format(return_type))
docs: Return different formatted classification results.