Contents

init(shape:scalarType:strides:interleaveLayout:)

Initialize an NDArray with the provided shape, scalar type, strides, and interleaved dimension.

Declaration

init(shape: [Int], scalarType: NDArray.ScalarType, strides: [Int], interleaveLayout: NDArray.InterleaveLayout)

Parameters

  • shape:

    The length of each dimension of the ndArray.

  • scalarType:

    The type of elements in the ndArray.

  • strides:

    The strides of the ndArray.

  • interleaveLayout:

    Which dimension is interleaved and by what factor. See Interleavelayout Swift.struct.

Discussion

shape and strides must have the same number of elements.