---
title: "init(data:scalarType:shape:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/bnnsndarraydescriptor/init(data:scalartype:shape:)"
---

# init(data:scalarType:shape:)

Returns a new n-dimensional array descriptor that references the same data as the specified raw pointer.

## Declaration

```swift
init?(data: UnsafeMutableRawBufferPointer, scalarType: any BNNSScalar.Type, shape: BNNS.Shape)
```

## Parameters

- `data`: A pointer to the underlying data.
- `scalarType`: The data type of the data.
- `shape`: The shape of the n-dimensional array descriptor.

## See Also

### Creating an Array Descriptor

- [init(flags:layout:size:stride:data:data_type:table_data:table_data_type:data_scale:data_bias:)](accelerate/bnnsndarraydescriptor/init(flags:layout:size:stride:data:data_type:table_data:table_data_type:data_scale:data_bias:).md)
- [init(data:shape:)](accelerate/bnnsndarraydescriptor/init(data:shape:).md)
- [init(dataType:shape:)](accelerate/bnnsndarraydescriptor/init(datatype:shape:).md)
- [init()](accelerate/bnnsndarraydescriptor/init().md)
