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

# view(as:)

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

## Declaration

```swift
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

Return Value A mutable view of the tensor.
