docstr: A data structure of index and numpy data.
  It's used to replace pd.Series due to high-speed.
  
  Parameters
  ----------
  data : Union[int, float, np.number, list, dict, pd.Series]
      the input data
  index : Union[list, pd.Index]
      the index of data.
      empty list indicates that auto filling the index to the length of data
docstr_tok: ["A","data","structure","of","index","and","numpy","data",".","It","'s","used","to","replace","pd.Series","due","to","high-speed",".","Parameters","--","--","--","--","--","data",":","Union","[","int",",","float",",","np.number",",","list",",","dict",",","pd.Series","]","the","input","data","index",":","Union","[","list",",","pd.Index","]","the","index","of","data",".","empty","list","indicates","that","auto","filling","the","index","to","the","length","of","data"]
code: def __init__(
      self,
      data: Union[int, float, np.number, list, dict, pd.Series] = [],
      index: Union[List, pd.Index, Index] = [],
  ):
      """A data structure of index and numpy data.
      It's used to replace pd.Series due to high-speed.
  
      Parameters
      ----------
      data : Union[int, float, np.number, list, dict, pd.Series]
          the input data
      index : Union[list, pd.Index]
          the index of data.
          empty list indicates that auto filling the index to the length of data
      """
      # for special data type
      if isinstance(data, dict):
          assert len(index) == 0
          if len(data) > 0:
              index, data = zip(*data.items())
          else:
              index, data = [], []
      elif isinstance(data, pd.Series):
          assert len(index) == 0
          index, data = data.index, data.values
      elif isinstance(data, (int, float, np.number)):
          data = [data]
      super().__init__(data, index)
      assert self.ndim == 1
  
imports: from __future__ import annotations
  from typing import Dict, Tuple, Union, Callable, List
  import bisect
  import numpy
  import pandas
label_desc: Use image node_id 1 to create a new SingleData object from inherited base classes: IndexData with example: obj = SingleData(data, index)