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

# reshape(with:sourceArray:dimensionCount:dimensionSizes:destinationArray:)

## Declaration

```swift
func reshape(with cmdBuf: (any MTLCommandBuffer)?, sourceArray: MPSNDArray, dimensionCount numberOfDimensions: Int, dimensionSizes: UnsafeMutablePointer<Int>, destinationArray: MPSNDArray?) -> MPSNDArray?
```
