---
title: "init(MTLBuffer:shape:dataType:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Initializer
path: "metalperformanceshadersgraph/mpsgraphtensordata/init(mtlbuffer:shape:datatype:)"
---

# init(MTLBuffer:shape:dataType:)

## Declaration

```swift
init(MTLBuffer buffer: any MTLBuffer, shape: [NSNumber], dataType: MPSDataType)
```
