<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData06ShapedB0V"
  },
  "title" : "ShapedData"
}
-->

# ShapedData

A collection type that represents multidimensional data in a data frame element.

```
struct ShapedData<Element>
```

## Topics

### Initializers

[`init(shape: [Int], strides: [Int], contents: [Element])`](/documentation/TabularData/ShapedData/init(shape:strides:contents:))

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

### Instance Properties

[`let contents: [Element]`](/documentation/TabularData/ShapedData/contents)

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

[`let shape: [Int]`](/documentation/TabularData/ShapedData/shape)

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

[`let strides: [Int]`](/documentation/TabularData/ShapedData/strides)

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

### Subscripts

[`subscript(Int...) -> Element`](/documentation/TabularData/ShapedData/subscript(_:))

Retrieves an element using an index for each dimension.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)