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

# view(as:)

Consume this raw view to create a typed view.

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

## Discussion> Note:`T` must match `self.scalarType.type`.

---

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)