<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/ShapedData/init(shape:strides:contents:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData06ShapedB0V5shape7strides8contentsACyxGSaySiG_AHSayxGtcfc"
  },
  "title" : "init(shape:strides:contents:)"
}
-->

# init(shape:strides:contents:)

Creates a multidimensional shaped array from a one-dimensional array.

```
init(shape: [Int], strides: [Int], contents: [Element])
```

## Parameters

`shape`

An integer array that stores the size of each dimension in the corresponding element.

`strides`

An integer array that stores the number of memory locations
that span the length of each dimension in the corresponding element.

`contents`

A linear array that stores the elements of the multidimensional array.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)