Contents

init(identityMatrixOfSize:)

Initialize as an identity matrix.

Declaration

init(identityMatrixOfSize size: Int)

Parameters

  • size:

    The size (order) of the matrix

Discussion

The initializer creates a shaped array of shape size x size where the contents are zeros except array[scalarAt: x, x], which are ones.

See Also

Creating a shaped array type