---
title: "init(data:shape:strides:)"
framework: coreml
role: symbol
role_heading: Initializer
path: "coreml/mlshapedarray/init(data:shape:strides:)"
---

# init(data:shape:strides:)

Creates a shaped array from a block of data, a shape, and strides.

## Declaration

```swift
init(data: Data, shape: [Int], strides: [Int])
```

## Parameters

- `data`: The block of data that holds the contents of the shaped array.
- `shape`: The shape of the array.
- `strides`: The strides of the array.

## See Also

### Creating a shaped array from data

- [init(data:shape:)](coreml/mlshapedarray/init(data:shape:).md)
