---
title: "complexTensor(realTensor:imaginaryTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/complextensor(realtensor:imaginarytensor:name:)"
---

# complexTensor(realTensor:imaginaryTensor:name:)

Returns a complex tensor from the two input tensors.

## Declaration

```swift
func complexTensor(realTensor: MPSGraphTensor, imaginaryTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `realTensor`: The real part of the complex tensor.
- `imaginaryTensor`: The imaginary part of the complex 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.
