(self, idx)
return func_text, global_vars
Example of generated implementation with provided index:
        def _df_getitem_bool_array_idx_impl(self, idx):
          length = len(self._index)
          if length != len(idx):
            raise ValueError("Item wrong length.")
          taken_pos = getitem_by_mask(numpy.arange(length), idx)
          res_index = self._index.take(taken_pos)
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, taken_pos)
          data_1 = self._data[1][0]
          res_data_1 = sdc_take(data_1, taken_pos)
          data_2 = self._data[2][0]
          res_data_2 = sdc_take(data_2, taken_pos)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
Example of generated implementation with provided index:
        def _df_getitem_bool_array_idx_impl(self, idx):
          length = len(self._index)
          if length != len(idx):
            raise ValueError("Item wrong length.")
          taken_pos = getitem_by_mask(numpy.arange(length), idx)
          res_index = self._index.take(taken_pos)
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, taken_pos)
          data_1 = self._data[1][0]
          res_data_1 = sdc_take(data_1, taken_pos)
          data_2 = self._data[2][0]
          res_data_2 = sdc_take(data_2, taken_pos)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
Example of generated implementation with provided index : def _df_getitem_bool_array_idx_impl ( self idx ) : length = len ( self . _index ) if length ! = len ( idx ) : raise ValueError ( Item wrong length . ) taken_pos = getitem_by_mask ( numpy . arange ( length ) idx ) res_index = self . _index . take ( taken_pos ) data_0 = self . _data [ 0 ] [ 0 ] res_data_0 = sdc_take ( data_0 taken_pos ) data_1 = self . _data [ 1 ] [ 0 ] res_data_1 = sdc_take ( data_1 taken_pos ) data_2 = self . _data [ 2 ] [ 0 ] res_data_2 = sdc_take ( data_2 taken_pos ) return pandas . DataFrame ( { A : res_data_0 B : res_data_1 C : res_data_2 } index = res_index )
def df_getitem_bool_array_idx_codegen(self, idx):
    """
    Example of generated implementation with provided index:
        def _df_getitem_bool_array_idx_impl(self, idx):
          length = len(self._index)
          if length != len(idx):
            raise ValueError("Item wrong length.")
          taken_pos = getitem_by_mask(numpy.arange(length), idx)
          res_index = self._index.take(taken_pos)
          data_0 = self._data[0][0]
          res_data_0 = sdc_take(data_0, taken_pos)
          data_1 = self._data[1][0]
          res_data_1 = sdc_take(data_1, taken_pos)
          data_2 = self._data[2][0]
          res_data_2 = sdc_take(data_2, taken_pos)
          return pandas.DataFrame({"A": res_data_0, "B": res_data_1, "C": res_data_2}, index=res_index)
    """
    func_lines = ['def _df_getitem_bool_array_idx_impl(self, idx):']
    func_lines += df_getitem_bool_array_idx_main_codelines(self, idx)
    func_text = '\n'.join(func_lines)
    global_vars = {'pandas': pandas, 'numpy': numpy,
                   'getitem_by_mask': getitem_by_mask,
                   'sdc_take': nplike_take}

    return func_text, global_vars
def df_getitem_bool_array_idx_codegen ( self , idx ) : func_lines = [ 'def _df_getitem_bool_array_idx_impl(self, idx):' ] func_lines += df_getitem_bool_array_idx_main_codelines ( self , idx ) func_text = '\n' . join ( func_lines ) global_vars = { 'pandas' : pandas , 'numpy' : numpy , 'getitem_by_mask' : getitem_by_mask , 'sdc_take' : nplike_take } return func_text , global_vars