---
title: "shapedArray(of:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mltensor/shapedarray(of:)"
---

# shapedArray(of:)

Returns a materialized representation of the tensor.

## Declaration

```swift
func shapedArray<Scalar>(of scalarType: Scalar.Type) async -> MLShapedArray<Scalar> where Scalar : MLShapedArrayScalar, Scalar : MLTensorScalar
```

## Return Value

Return Value A MLShapedArray with the contents of the tensor.
