<!--
{
  "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/NDArray/mutableView(as:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime7NDArrayV11mutableView2asAC07MutableE0Vy_xGxm_ts15BitwiseCopyableRzlF"
  },
  "title" : "mutableView(as:)"
}
-->

# mutableView(as:)

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

```
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 [`scalarType`](/documentation/CoreAI/NDArray/scalarType-swift.property).
For example, pass `Int32.self` for an array with scalar type `.int32`.

## Return Value

A mutable view of the array’s elements.

---

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)