---
title: shape
framework: coreai
role: symbol
role_heading: Instance Property
path: coreai/ndarray/shape
---

# shape

The length of each dimension of the array.

## Declaration

```swift
var shape: [Int] { get }
```

## See Also

### Inspecting an array

- [scalarType](coreai/ndarray/scalartype-swift.property.md)
- [strides](coreai/ndarray/strides.md)
