view(as:)
Create a typed MutableView of the same storage as this raw view.
Declaration
consuming func view<T>(as type: T.Type = T.self) -> NDArray.MutableView<T> where T : BitwiseCopyableParameters
- type:
Must be the type corresponding to the
ScalarTypeof this tensor. For example if this tensor has scalar type.int32then you would passInt32.selffor type.
Return Value
A mutable view of the tensor.