<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLSendableFeatureValue",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "s:6CoreML22MLSendableFeatureValueV"
  },
  "title" : "MLSendableFeatureValue"
}
-->

# MLSendableFeatureValue

A sendable feature value.

```
struct MLSendableFeatureValue
```

## Overview

This version of feature value is similar to [`MLFeatureValue`](/documentation/CoreML/MLFeatureValue) but it can be passed across concurrency domains.
Once in the target concurrency domain, you can then convert it to a [`MLFeatureValue`](/documentation/CoreML/MLFeatureValue).

## Topics

### Creating a sendable feature value

[`init(_:)`](/documentation/CoreML/MLSendableFeatureValue/init(_:))

Creates a feature value containing a double-precision floating-point value.

[`init(undefined: MLFeatureType)`](/documentation/CoreML/MLSendableFeatureValue/init(undefined:))

Creates an undefined feature value of a specific type.

### Accessing the values

[`var doubleValue: Double?`](/documentation/CoreML/MLSendableFeatureValue/doubleValue)

The double-precision floating-point value, if the contained value is a double.

[`var float16Value: Float16?`](/documentation/CoreML/MLSendableFeatureValue/float16Value)

The 16-bit floating-point value, if the contained value is a 16-bit float.

[`var floatValue: Float?`](/documentation/CoreML/MLSendableFeatureValue/floatValue)

The single-precision floating-point value, if the contained value is a float.

[`var integerDictionaryValue: [Int : Double]?`](/documentation/CoreML/MLSendableFeatureValue/integerDictionaryValue)

The integer dictionary value, if the contained value is a dictionary of integers to numbers.

[`var integerValue: Int?`](/documentation/CoreML/MLSendableFeatureValue/integerValue)

The integer value, if the contained value is an integer.

[`var isScalar: Bool`](/documentation/CoreML/MLSendableFeatureValue/isScalar)

A Boolean value indicating whether the value is a single number.

[`var isShapedArray: Bool`](/documentation/CoreML/MLSendableFeatureValue/isShapedArray)

A Boolean value indicating whether the value is a shaped array.

[`var isUndefined: Bool`](/documentation/CoreML/MLSendableFeatureValue/isUndefined)

A Boolean value indicating whether the value is missing or undefined.

[`var stringArrayValue: [String]?`](/documentation/CoreML/MLSendableFeatureValue/stringArrayValue)

The string array value, if the contained value is an array of string.

[`var stringDictionaryValue: [String : Double]?`](/documentation/CoreML/MLSendableFeatureValue/stringDictionaryValue)

The string dictionary value, if the contained value is a dictionary of strings to numbers.

[`var stringValue: String?`](/documentation/CoreML/MLSendableFeatureValue/stringValue)

The string value, if the contained value is a string.

[`var type: MLFeatureType`](/documentation/CoreML/MLSendableFeatureValue/type)

The type of value.

### Getting the shaped array value

[`func shapedArrayValue<Scalar>(of: Scalar.Type) -> MLShapedArray<Scalar>?`](/documentation/CoreML/MLSendableFeatureValue/shapedArrayValue(of:))

Returns the shaped array value, if the contained value is a shaped array of the specified type.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)