def __getitem__(self, index): normalized_index= indexing.normalize_slices(self.shape,index) combined_index = indexing.combine_indices(self._private.indices, normalized_index) if indexing.number_of_dimensions_after_index(self._original_set().number_of_dimensions(), combined_index) == 0: return GridPoint(combined_index, self._original_set()) else: return SubGrid(self._original_set(), combined_index)
def get_values_in_store(self, indices, attributes, by_key=True): normalized_indices = indexing.normalize_slices(self.shape, indices) combined_index = indexing.combine_indices(self._private.indices, normalized_indices) result = self._private.grid.get_values_in_store( combined_index, attributes) return result
def set_values_in_store_async(self, indices, attributes, values, by_key=True): normalized_indices = indexing.normalize_slices(self.shape, indices) combined_index = indexing.combine_indices(self._private.indices, normalized_indices) return self._private.grid.set_values_in_store_async( combined_index, attributes, values)
def __getitem__(self, index): normalized_index= indexing.normalize_slices(self.shape,index) combined_index = indexing.combine_indices(self._private.indices, normalized_index) return new_subgrid_from_index(self._original_set(), combined_index)
def set_values_in_store_async(self, indices, attributes, values, by_key = True): normalized_indices = indexing.normalize_slices(self.shape,indices) combined_index = indexing.combine_indices(self._private.indices, normalized_indices) return self._private.grid.set_values_in_store_async(combined_index, attributes, values)
def get_values_in_store(self, indices, attributes, by_key = True): normalized_indices = indexing.normalize_slices(self.shape,indices) combined_index = indexing.combine_indices(self._private.indices, normalized_indices) result = self._private.grid.get_values_in_store(combined_index, attributes) return result