parameters: (arr, num: int)
return_statement: return arr.take(taker)
docstring: Index compat for np.tile.
  
      Notes
      -----
      Does not support multi-dimensional `num`.
docstring_summary: Index compat for np.tile.
docstring_tokens: Index compat for np . tile .
function: def tile_compat(arr, num: int):
      """
      Index compat for np.tile.
  
      Notes
      -----
      Does not support multi-dimensional `num`.
      """
      if isinstance(arr, np.ndarray):
          return np.tile(arr, num)
  
      # Otherwise we have an Index
      taker = np.tile(np.arange(len(arr)), num)
      return arr.take(taker)
function_tokens: def tile_compat ( arr , num : int ) : if isinstance ( arr , np . ndarray ) : return np . tile ( arr , num ) # Otherwise we have an Index taker = np . tile ( np . arange ( len ( arr ) ) , num ) return arr . take ( taker )