Contents

init(shape:scalarType:)

Creates an array with the specified shape and scalar type.

Declaration

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

Parameters

  • shape:

    The length of each dimension.

  • scalarType:

    The scalar element type.

Discussion

This initializer creates an array with contiguous, row-major strides.

See Also

Creating an array