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 __eq__(self, other):
      if isinstance(other, RaggedArray):
          if len(other) != len(self):
              raise ValueError(
                  """
  Cannot check equality of RaggedArray values of unequal length
      len(ra1) == {len_ra1}
      len(ra2) == {len_ra2}""".format(
                      len_ra1=len(self), len_ra2=len(other)
                  )
              )
  
          result = _eq_ragged_ragged(
              self.start_indices,
              self.flat_array,
              other.start_indices,
              other.flat_array,
          )
      else:
          # Convert other to numpy array
          if not isinstance(other, np.ndarray):
              other_array = np.asarray(other)
          else:
              other_array = other
  
          if other_array.ndim == 1 and other_array.dtype.kind != "O":
              # Treat as ragged scalar
              result = _eq_ragged_scalar(
                  self.start_indices, self.flat_array, other_array
              )
          elif (
              other_array.ndim == 1
              and other_array.dtype.kind == "O"
              and len(other_array) == len(self)
          ):
              # Treat as vector
              result = _eq_ragged_ndarray1d(
                  self.start_indices, self.flat_array, other_array
              )
          elif (
              other_array.ndim == 2
              and other_array.dtype.kind != "O"
              and other_array.shape[0] == len(self)
          ):
              # Treat rows as ragged elements
              result = _eq_ragged_ndarray2d(
                  self.start_indices, self.flat_array, other_array
              )
          else:
              raise ValueError(
                  """
  Cannot check equality of RaggedArray of length {ra_len} with:
      {other}""".format(
                      ra_len=len(self), other=repr(other)
                  )
              )
  
      return result
  
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 2 for calling the RaggedArray obj's underlying member method code with example usage: obj.__eq__(other) and returns: result