Macaulay2 » Documentation
Packages » GameTheory :: slice
next | previous | forward | backward | up | index | toc

slice -- extract a slice of a tensor

Description

This method varies the index at the position given by the length of `Lstart`, iterating from 0 to $d_i - 1$, where $d_i$ is the corresponding index of the format.

The slice is formed by fixing all other indices and varying only the one at the slicing position.

i1 : T = zeroTensor(QQ, {2,3,2});
i2 : T#{0,0,0} = 5;
i3 : T#{0,1,0} = 6;
i4 : T#{0,2,0} = 7;
i5 : slice(T, {0}, {0})

o5 = {5, 6, 7}

o5 : List

See also

Ways to use slice:

  • slice(Tensor,List,List)

For the programmer

The object slice is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/GameTheory.m2:1146:0.