<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/InferenceFunction/Inputs/insert(_:for:)-5o5oi",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core AI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime17InferenceFunctionV6InputsV6insert_3foryAA7NDArrayV4ViewVy_xGn_SSts15BitwiseCopyableRzlF"
  },
  "title" : "insert(_:for:)"
}
-->

# insert(_:for:)

Inserts a typed array view as the input with the specified name.

```
mutating func insert<Element>(_ view: consuming NDArray.View<Element>, for inputName: String) where Element : BitwiseCopyable
```

## Parameters

`view`

A typed view of the array to use as the input value.

`inputName`

The name of the input to set.

---

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)