Skip to main content

Mojo function

ndbuffer_view_from_tensor

ndbuffer_view_from_tensor[type: DType, rank: Int](tensor: Tensor[type, rank]) -> NDBuffer[$0, $1]

ndbuffer_view_from_tensor[type: DType, in_rank: Int, out_rank: Int](tensor: Tensor[type, in_rank], offset: Int, out_shape: IndexList[out_rank]) -> NDBuffer[$0, $2]