---
title: "scatterAlongAxis(updates:indices:mode:axis:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/scatteralongaxis(updates:indices:mode:axis:)"
---

# scatterAlongAxis(updates:indices:mode:axis:)

Adds a scatter-along-axis operation to the current graph

## Declaration

```swift
func scatterAlongAxis(updates: BNNSGraph.Builder.Tensor<T>, indices: some BNNSGraph.Builder.OperationParameter<Int32>, mode: BNNSGraph.Builder.ScatterMode, axis: Int) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `updates`: A tensor that specifes the values that the operation scatters.
- `indices`: The indices that the operation scatters.
- `mode`: An enumeration that specifies how the operation calculates scattered values.
- `axis`: The axis over which the operation scatters..
