---
title: "bandPart(_:numLowerTensor:numUpperTensor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/bandpart(_:numlowertensor:numuppertensor:name:)"
---

# bandPart(_:numLowerTensor:numUpperTensor:name:)

Creates the band part operation and returns the result.

## Declaration

```swift
func bandPart(_ inputTensor: MPSGraphTensor, numLowerTensor: MPSGraphTensor, numUpperTensor: MPSGraphTensor, name: String?) -> MPSGraphTensor
```

## Parameters

- `inputTensor`: The source tensor to copy.
- `numLowerTensor`: Scalar Int32 tensor. The number of diagonals in the lower triangle to keep. If -1, keep all.
- `numUpperTensor`: Scalar Int32 tensor. The number of diagonals in the upper triangle to keep. If -1, keep all.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object.

## Discussion

Discussion See above discussion of bandPartWithTensor: numLower: numUpper: name:
