# gather

`import { gather } from "destack:tensor";`

Gather slices from `operand`.

```ds title="gather"
export declare function gather<T, const OperandRank: usize, const IndexRank: usize, const OutRank: usize, const OffsetCount: usize, const CollapsedCount: usize, const StartIndexCount: usize>(operand: Tensor<T, OperandRank>, indices: Tensor<usize, IndexRank>, axes: GatherAxes<OffsetCount, CollapsedCount, StartIndexCount>, sliceShape: Shape<OperandRank>, options?: TensorOutputOptions<T, OutRank> | undefined): Tensor<T, OutRank>
```

[language/library/src/tensor/ops.ds:403:417](https://github.com/destack-sh/destack/blob/main/language/library/src/tensor/ops.ds#L403-L417)
