---
title: ndArray
framework: coreai
role: symbol
role_heading: Instance Property
path: coreai/inferencefunction/asyncvalue/ndarray
---

# ndArray

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

## Declaration

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

## Discussion

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.
