<!--
{
  "availability" : [
    "iOS: 26.3.0 -",
    "iPadOS: 26.3.0 -",
    "macCatalyst: 26.3.0 -",
    "macOS: 26.3.0 -",
    "tvOS: 26.3.0 -",
    "visionOS: 26.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraph/planarTensor(tensor:name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal Performance Shaders Graph",
      "MetalPerformanceShadersGraph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraph(im)planarTensorWithComplexTensor:name:"
  },
  "title" : "planarTensor(tensor:name:)"
}
-->

# planarTensor(tensor:name:)

Returns a real-valued tensor from a complex-valued tensor with real and imaginary planes separated.

```
func planarTensor(tensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

`tensor`

The input tensor.

`name`

An optional string which serves as an identifier for the operation..

## Return Value

A valid `MPSGraphTensor` object containing the elementwise result of the applied operation.

## Discussion

Creates a complexToPlanar operation and returns the result tensor.
In case the input tensor is a complex tensor the result tensor is twice as wide
as the input tensor in the last dimension, and its datatype will be the underlying datatype of
the input tensor - for example `<3xcomplex<f16>>` becomes `<6xf16>`.
In case the input is not complex-valued, this op simply returns the input tensor.
For complex input:

```md
{ resultTensor[...,i] = realPart(inputTensor[...,i])
{ resultTensor[...,i+DimSize(inputTensor,-1)] = imagPart(inputTensor[...,i])
```

For real-valued input:

```md
resultTensor = inputTensor
```

---

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)