---
title: "concatenated(with:alongAxis:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mltensor/concatenated(with:alongaxis:)"
---

# concatenated(with:alongAxis:)

Returns a concatenated tensor along the specified axis.

## Declaration

```swift
func concatenated(with other: MLTensor, alongAxis axis: Int = 0) -> MLTensor
```

## Parameters

- `other`: The tensor to concatenate. The tensors must have the same dimensions, except for the specified axis.
- `axis`: The axis along which to concatenate. Negative values wrap around but must be in the range [-rank, rank).

## See Also

### Clamping and concatenating

- [clamped(to:)](coreml/mltensor/clamped(to:).md)
