code: def _check_target_array(self, y, allowed=None):
      if not isinstance(y[0], (int, np.integer)):
          raise AttributeError(
              "y must be an integer array.\nFound %s" % y.dtype
          )
      found_labels = np.unique(y)
      if (found_labels < 0).any():
          raise AttributeError(
              "y array must not contain negative labels."
              "\nFound %s" % found_labels
          )
      if allowed is not None:
          found_labels = tuple(found_labels)
          if found_labels not in allowed:
              raise AttributeError(
                  "Labels not in %s.\nFound %s"
                  % (allowed, found_labels)
              )
  
file_path: mlxtend/mlxtend/_base/_classifier.py
imports: from time import time
  import numpy
label_desc: Use image node_id 2 for calling the _Classifier obj's underlying member method code with example usage: obj._check_target_array(y, allowed) without return types