Contents

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 : 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.