---
title: "reshape(with:sourceArray:shape:destinationArray:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsndarrayidentity/reshape(with:sourcearray:shape:destinationarray:)"
---

# reshape(with:sourceArray:shape:destinationArray:)

## Declaration

```swift
func reshape(with cmdBuf: (any MTLCommandBuffer)?, sourceArray: MPSNDArray, shape: [NSNumber], destinationArray: MPSNDArray?) -> MPSNDArray?
```
