Contents

init(repeating:shape:)

Creates a shaped array type that initializes every element to the same value.

Declaration

init(repeating value: Self.Scalar, shape: [Int])

Parameters

  • value:

    A scalar value. The initializer assigns every element in the shaped array to value.

  • shape:

    An integer array. Each element represents the size of the shaped array’s corresponding dimension.

See Also

Creating a shaped array type