<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSGraph/Builder/Tensor/transpose(axes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate9BNNSGraphO7BuilderV6TensorV9transpose4axesAGy__xGSaySiG_tF"
  },
  "title" : "transpose(axes:)"
}
-->

# transpose(axes:)

Adds a transpose operation to the current graph.

```
func transpose(axes: [Int]) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

`axes`

An array that specifies the order in which the operation permutes
the dimensions. For example, specify an `axes` of `[0, 1, 3, 2]` to specify that
the operation swaps the last two dimensions of a 4D tensor.

---

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)