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

# view(as:)

Create a typed `MutableView` of the same storage as this raw view.

```
consuming func view<T>(as type: T.Type = T.self) -> NDArray.MutableView<T> where T : BitwiseCopyable
```

## Parameters

`type`

Must be the type corresponding to the `ScalarType` of this tensor.
For example if this tensor has scalar type `.int32` then you would pass `Int32.self` for type.

## Return Value

A mutable view of the tensor.

---

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)