<!--
{
  "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/AsyncValue/ndArray",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core AI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime17InferenceFunctionV10AsyncValueC7ndArrayAA7NDArrayVSgvp"
  },
  "title" : "ndArray"
}
-->

# ndArray

Waits for any pending write access on the underlying ndArray to complete, then returns it.

```
final var ndArray: NDArray? { get async throws }
```

## Discussion> Note: If this value was constructed from a provided MTLBuffer directly, then this will return a copy
> of the data to avoid unsafe aliasing. If aliasing is desired, you can work with the original MTLBuffer
> directly.

Returns `nil` if `kind` is not `.ndArray`.

---

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)