Function slice
Slices the result of an operation.
Parameters
Name | Description |
---|---|
input | The operation that should be sliced. |
start | The starting indices for each dimension. |
stop | The stopping indices for each dimension. |
Returns
The new Operation
.
Example
import dopt .core : evaluate;
auto s1 = int32([3, 3], [
1, 2, 3,
4, 5, 6,
7, 8, 9
]) .slice([1, 1], [3, 3]);
assert(s1 .evaluate() .as!int == [
5, 6,
8, 9
]);