---
title: "mutableView(as:)"
framework: coreai
role: symbol
role_heading: Instance Method
path: "coreai/ndarray/mutableview(as:)"
---

# mutableView(as:)

Returns a mutable, typed view of this array’s elements.

## Declaration

```swift
mutating func mutableView<T>(as type: T.Type = T.self) -> NDArray.MutableView<T> where T : BitwiseCopyable
```

## Parameters

- `type`: The Swift type that corresponds to this array’s doc://com.apple.coreai/documentation/CoreAI/NDArray/scalarType-swift.property. For example, pass Int32.self for an array with scalar type .int32.

## Mentioned in

Integrating on-device AI models in your app with Core AI

## Return Value

Return Value A mutable view of the array’s elements.

## See Also

### Accessing elements

- [view(as:)](coreai/ndarray/view(as:).md)
- [rawView()](coreai/ndarray/rawview().md)
- [mutableRawView()](coreai/ndarray/mutablerawview().md)
