---
title: "init(from:)"
framework: coreml
role: symbol
role_heading: Initializer
path: "coreml/mlshapedarrayslice/init(from:)"
---

# init(from:)

Creates an array slice from the passed decoder.

## Declaration

```swift
init(from decoder: any Decoder) throws
```

## Parameters

- `decoder`: The object that decodes the array slice for initialization.

## See Also

### Encoding and decoding an array slice

- [encode(to:)](coreml/mlshapedarrayslice/encode(to:).md)
