---
title: shape
framework: coreml
role: symbol
role_heading: Instance Property
path: coreml/mlshapedarrayprotocol/shape
---

# shape

An integer array in which each element represents the size of the corresponding dimension.

## Declaration

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

## See Also

### Inspecting a shaped array type

- [strides](coreml/mlshapedarrayprotocol/strides.md)
- [count](coreml/mlshapedarrayprotocol/count.md)
- [isScalar](coreml/mlshapedarrayprotocol/isscalar.md)
- [scalarCount](coreml/mlshapedarrayprotocol/scalarcount.md)
- [scalar](coreml/mlshapedarrayprotocol/scalar-swift.property.md)
- [scalars](coreml/mlshapedarrayprotocol/scalars.md)
- [withUnsafeShapedBufferPointer(_:)](coreml/mlshapedarrayprotocol/withunsafeshapedbufferpointer(_:).md)
