Example #1
0
 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)
Example #2
0
 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
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 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)
Example #6
0
 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
Example #7
0
 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)