---
title: "planarTensor(tensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/planartensor(tensor:name:)"
---

# planarTensor(tensor:name:)

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

## Declaration

```swift
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

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

## Discussion

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: { resultTensor[...,i] = realPart(inputTensor[...,i]) { resultTensor[...,i+DimSize(inputTensor,-1)] = imagPart(inputTensor[...,i]) For real-valued input: resultTensor = inputTensor
