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

# init(data:shape:)

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

## Declaration

```swift
init?<T>(data: UnsafeMutableBufferPointer<T>, shape: BNNS.Shape) where T : BNNSScalar
```

## Parameters

- `data`: A pointer to the underlying 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:scalarType:shape:)](accelerate/bnnsndarraydescriptor/init(data:scalartype:shape:).md)
- [init(dataType:shape:)](accelerate/bnnsndarraydescriptor/init(datatype:shape:).md)
- [init()](accelerate/bnnsndarraydescriptor/init().md)
