class_docstr: Base class providing API and common functions for all multi-label
  classifiers.
  
  Implements base functionality for ML classifiers, especially the get/set params for
  scikit-learn compatibility.
  
  Attributes
  ----------
  copyable_attrs : List[str]
      list of attribute names that should be copied when class is cloned
docstr: Subset rows or columns from matrix
  
  This function subsets the array of binary label vectors to
  include only certain labels.
  
  Parameters
  ----------
  y : array-like of array-likes
      An array-like of binary label vectors.
  subset: array-like of integers
      array of integers, indices that will be subsetted from
      array-likes in y
  axis: integer 0 for 'rows', 1 for 'labels',
      control variable for whether to return rows or labels as
      indexed by subset
  
  Returns
  -------
  multi-label binary label vector : array-like of array-likes of {0,1}
      array of binary label vectors including label data only for
      labels from parameter labels
docstr_tok: ["Subset","rows","or","columns","from","matrix","This","function","subsets","the","array","of","binary","label","vectors","to","include","only","certain","labels",".","Parameters","--","--","--","--","--","y",":","array-like","of","array-likes","An","array-like","of","binary","label","vectors",".","subset",":","array-like","of","integers","array","of","integers",",","indices","that","will","be","subsetted","from","array-likes","in","y","axis",":","integer","0","for","'rows","'",",","1","for","'labels","'",",","control","variable","for","whether","to","return","rows","or","labels","as","indexed","by","subset","Returns","--","--","--","-","multi-label","binary","label","vector",":","array-like","of","array-likes","of","{","0,1","}","array","of","binary","label","vectors","including","label","data","only","for","labels","from","parameter","labels"]
code: def _generate_data_subset(self, y, subset, axis):
      """Subset rows or columns from matrix
  
      This function subsets the array of binary label vectors to
      include only certain labels.
  
      Parameters
      ----------
      y : array-like of array-likes
          An array-like of binary label vectors.
      subset: array-like of integers
          array of integers, indices that will be subsetted from
          array-likes in y
      axis: integer 0 for 'rows', 1 for 'labels',
          control variable for whether to return rows or labels as
          indexed by subset
  
      Returns
      -------
      multi-label binary label vector : array-like of array-likes of {0,1}
          array of binary label vectors including label data only for
          labels from parameter labels
      """
      return_data = None
      if axis == 1:
          return_data = y.tocsc()[:, subset]
      elif axis == 0:
          return_data = y.tocsr()[subset, :]
  
      return return_data
  
file_path: scikit-multilearn/skmultilearn/base/base.py
imports: import numpy
  from ..utils import get_matrix_in_format, matrix_creation_function_for_format
  from scipy.sparse import issparse
  from sklearn.base import BaseEstimator, ClassifierMixin
label_desc: Use image node_id 2 for calling the MLClassifierBase obj's underlying member method code with example usage: obj._generate_data_subset(y, subset, axis) and returns: return_data