Initializer

init(from:)

Creates an array from a dictionary wrapped in a data value.

Declaration

init?(from dataValue: MLDataValue)
Available when Key conforms to MLDataValueConvertible and Value conforms to MLDataValueConvertible.

Discussion

Use this initializer to create an array by converting an MLDataValue with an underlying type of MLDataValue.DictionaryType. You can confirm the data value’s underlying type by retrieving a non-nil value from dictionaryValue or by inspecting the type property.

This initializer is equivalent to init(from:).

Relationships

See Also

Converting Between Dictionaries and Create ML Types

var dataValue: MLDataValue

The dictionary wrapped in a data value.

static var dataValueType: MLDataValue.ValueType

The underlying type a dictionary uses when it wraps itself in a data value.