class_docstr: Data object used for all RasaModels.
  
  It contains all features needed to train the models.
  'data' is a mapping of attribute name, e.g. TEXT, INTENT, etc., and feature name,
  e.g. SENTENCE, SEQUENCE, etc., to a list of feature arrays representing the actual
  features.
  'label_key' and 'label_sub_key' point to the labels inside 'data'. For
  example, if your intent labels are stored under INTENT -> IDS, 'label_key' would
  be "INTENT" and 'label_sub_key' would be "IDS".
class_docstr_tok: ["Data","object","used","for","all","RasaModels",".","It","contains","all","features","needed","to","train","the","models",".","'data","'","is","a","mapping","of","attribute","name",",","e.g",".","TEXT",",","INTENT",",","etc.",",","and","feature","name",",","e.g",".","SENTENCE",",","SEQUENCE",",","etc.",",","to","a","list","of","feature","arrays","representing","the","actual","features",".","'label_key","'","and","'label_sub_key","'","point","to","the","labels","inside","'data","'",".","For","example",",","if","your","intent","labels","are","stored","under","INTENT","-",">","IDS",",","'label_key","'","would","be","``","INTENT","''","and","'label_sub_key","'","would","be","``","IDS","''","."]
docstr: Convert various size label_ids into single dim array.
  
  For multi-label y, map each distinct row to a string representation
  using join because str(row) uses an ellipsis if len(row) > 1000.
  Idea taken from sklearn's stratify split.
  
  Args:
      label_ids: The label ids.
  
  Raises:
      ValueError if dimensionality of label ids is not supported
  
  Returns:
      The single dim label array.
docstr_tok: ["Convert","various","size","label_ids","into","single","dim","array",".","For","multi-label","y",",","map","each","distinct","row","to","a","string","representation","using","join","because","str","(","row",")","uses","an","ellipsis","if","len","(","row",")",">","1000",".","Idea","taken","from","sklearn","'s","stratify","split",".","Args",":","label_ids",":","The","label","ids",".","Raises",":","ValueError","if","dimensionality","of","label","ids","is","not","supported","Returns",":","The","single","dim","label","array","."]
code: def _create_label_ids(label_ids: FeatureArray) -> np.ndarray:
      """Convert various size label_ids into single dim array.
  
      For multi-label y, map each distinct row to a string representation
      using join because str(row) uses an ellipsis if len(row) > 1000.
      Idea taken from sklearn's stratify split.
  
      Args:
          label_ids: The label ids.
  
      Raises:
          ValueError if dimensionality of label ids is not supported
  
      Returns:
          The single dim label array.
      """
      if label_ids.ndim == 1:
          return label_ids
  
      if label_ids.ndim == 2 and label_ids.shape[-1] == 1:
          return label_ids[:, 0]
  
      if label_ids.ndim == 2:
          return np.array(
              [" ".join(row.astype("str")) for row in label_ids]
          )
  
      if label_ids.ndim == 3 and label_ids.shape[-1] == 1:
          return np.array(
              [
                  " ".join(row.astype("str"))
                  for row in label_ids[:, :, 0]
              ]
          )
  
      raise ValueError("Unsupported label_ids dimensions")
  
imports: import logging
  from typing import Optional, DefaultDict, Dict, Iterable, Text, List, Tuple, Any, Union, NamedTuple, ItemsView, overload, cast
  from collections import defaultdict, OrderedDict
  import numpy
  import scipy.sparse
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 31 for calling the RasaModelData obj's underlying member method code with example usage: obj._create_label_ids(label_ids) and returns: label_ids, label_ids, np, np