def indexing_value
bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:1548
import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
1548def indexing_value(input: Core.Dynamic, +indexing: Indexing) -> Core.Dynamic & Result<&2, &1, Gather.Error, Core.Dynamic>:
1549 match indexing:
1550 case IndexSelected{+dim, +entries}:
1551 Gather.index_select(input, dim, entries)
1552 case GatheredBy{+dim, +index}:
1553 Gather.gather(input, dim, index)