Contents

view(as:)

Returns a read-only, typed view of this array’s elements.

Declaration

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

Parameters

  • type:

    The Swift type that corresponds to this array’s Scalartype Swift.property. For example, pass Int32.self for an array with scalar type .int32.

Return Value

A read-only view of the array’s elements.

See Also

Accessing elements