legate.core.LogicalStore.project#
- LogicalStore.project(self, int32_t dim, int64_t index) LogicalStore #
Projects out a dimension of the store. Each dimension i, where i >
dim
, is mapped to dimension i-1 in a returned store. A returned store provides a view to the input store where the values are on hyperplane \(x_\mathtt{dim} = \mathtt{index}\).For example, if a 2D store
A
contains[[1, 2], [3, 4]]
,A.project(0, 1)
yields a store equivalent to[3, 4]
, whereasA.project(1, 0)
yields[1, 3]
.- Parameters:
- Returns:
A new store with one fewer dimension
- Return type:
LogicalStore
- Raises:
ValueError – If
dim
is not a valid dimension name orindex
is out of bounds