---
title: mpsndarray()
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: metalperformanceshadersgraph/mpsgraphtensordata/mpsndarray()
---

# mpsndarray()

Return an mpsndarray object will copy contents if the contents are not stored in an MPS ndarray.

## Declaration

```swift
func mpsndarray() -> MPSNDArray
```

## Return Value

Return Value A valid MPSNDArray, or nil if allocation fails.
