<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNS/transpose(input:output:firstTransposeAxis:secondTransposeAxis:filterParameters:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4BNNSO9transpose5input6output18firstTransposeAxis06secondgH016filterParametersySo21BNNSNDArrayDescriptora_AKS2iSo010BNNSFilterK0aSgtKFZ"
  },
  "title" : "transpose(input:output:firstTransposeAxis:secondTransposeAxis:filterParameters:)"
}
-->

# transpose(input:output:firstTransposeAxis:secondTransposeAxis:filterParameters:)

Transposes a tensor by swapping two of its dimensions.

```
static func transpose(input: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor, firstTransposeAxis: Int, secondTransposeAxis: Int, filterParameters: BNNSFilterParameters? = nil) throws
```

## Parameters

`input`

The descriptor of the input.

`output`

The descriptor of the output.

`firstTransposeAxis`

The first axis of transposition.

`secondTransposeAxis`

The second axis of transposition.

`filterParameters`

Runtime filter parameters.

---

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)