<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLTensor/concatenated(with:alongAxis:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core ML",
      "CoreML"
    ],
    "preciseIdentifier" : "s:6CoreML8MLTensorV12concatenated4with9alongAxisA2C_SitF"
  },
  "title" : "concatenated(with:alongAxis:)"
}
-->

# concatenated(with:alongAxis:)

Returns a concatenated tensor along the specified axis.

```
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)`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)