init(shape:scalarType:strides:)
Creates an array with the specified shape, scalar type, and strides.
Declaration
init(shape: [Int], scalarType: NDArray.ScalarType, strides: [Int])Parameters
- shape:
The length of each dimension.
- scalarType:
The scalar element type.
- strides:
The distance, in elements, between consecutive values along each dimension.
Discussion
The shape and strides arrays must have the same number of elements.