class_docstr: Pandas ExtensionArray to represent ragged arrays
  
  Methods not otherwise documented here are inherited from ExtensionArray;
  please see the corresponding method on that class for the docstring
class_docstr_tok: ["Pandas","ExtensionArray","to","represent","ragged","arrays","Methods","not","otherwise","documented","here","are","inherited","from","ExtensionArray",";","please","see","the","corresponding","method","on","that","class","for","the","docstring"]
code: def _concat_same_type(cls, to_concat):
      # concat flat_arrays
      flat_array = np.hstack([ra.flat_array for ra in to_concat])
  
      # offset and concat start_indices
      offsets = np.hstack(
          [
              [0],
              np.cumsum([len(ra.flat_array) for ra in to_concat[:-1]]),
          ]
      )
  
      start_indices = np.hstack(
          [
              ra.start_indices + offset
              for offset, ra in zip(offsets, to_concat)
          ]
      )
  
      return RaggedArray(
          dict(flat_array=flat_array, start_indices=start_indices),
          copy=False,
      )
  
imports: from __future__ import annotations
  import re
  from functools import total_ordering
  from packaging.version import Version
  import numpy
  import pandas
  from numba import jit
  from pandas.api.extensions import ExtensionDtype, ExtensionArray, register_extension_dtype
  from numbers import Integral
  from pandas.api.types import pandas_dtype, is_extension_array_dtype
label_desc: Use image node_id 20 for calling the RaggedArray obj's underlying member method code with example usage: obj._concat_same_type(cls, to_concat) and returns: RaggedArray