drepr/old_code/prototype/drepr/services/index_iterator.py
def update_local_upperbound_index(self, start_idx: int = 0):
        """Recalculate correct upper bound of the current index (in one dimension) always start from second dimension"""
        if start_idx == 0:
            # we always know the upperbound of the first (0) dimension
            self.cached_data_ptr[0] = self.ra_reader.get_value(self.curr_index[:1])
            start_idx += 1

        for i, l, u, s in islice(
                zip(
                    range(self.n_dims), self.lower_bound_index, self.upper_bound_index,
                    self.step_sizes), start_idx, None):
            if u is None:
                # if the upperbound is undefined, we set it
                self.local_up_idx[i] = len(self.cached_data_ptr[i - 1])

            self.cached_data_ptr[i] = self.cached_data_ptr[i - 1][self.curr_index[i]]
Recalculate correct upper bound of the current index (in one dimension) always start from second dimension
Recalculate correct upper bound of the current index (in one dimension) always start from second dimension
Recalculate correct upper bound of the current index ( in one dimension ) always start from second dimension
def update_local_upperbound_index(self, start_idx: int = 0):
        if start_idx == 0:
            self.cached_data_ptr[0] = self.ra_reader.get_value(self.curr_index[:1])
            start_idx += 1
        for i, l, u, s in islice(
                zip(
                    range(self.n_dims), self.lower_bound_index, self.upper_bound_index,
                    self.step_sizes), start_idx, None):
            if u is None:
                self.local_up_idx[i] = len(self.cached_data_ptr[i - 1])
            self.cached_data_ptr[i] = self.cached_data_ptr[i - 1][self.curr_index[i]]
def update_local_upperbound_index ( self , start_idx : int = 0 ) : if start_idx == 0 : self . cached_data_ptr [ 0 ] = self . ra_reader . get_value ( self . curr_index [ : 1 ] ) start_idx += 1 for i , l , u , s in islice ( zip ( range ( self . n_dims ) , self . lower_bound_index , self . upper_bound_index , self . step_sizes ) , start_idx , None ) : if u is None : self . local_up_idx [ i ] = len ( self . cached_data_ptr [ i - 1 ] ) self . cached_data_ptr [ i ] = self . cached_data_ptr [ i - 1 ] [ self . curr_index [ i ] ]
Recalculate correct upper bound of the current index (in one dimension) always start from second dimension
Recalculate correct upper bound of the current index ( in one dimension ) always start from second dimension
"""Recalculate correct upper bound of the current index (in one dimension) always start from second dimension""" # we always know the upperbound of the first (0) dimension # if the upperbound is undefined, we set it
self
start_idx
int