Contents

init(repeating:shape:scalarType:)

Creates a tensor with the specified shape and a single, repeated scalar value.

Declaration

init<Scalar>(repeating repeatedValue: Scalar, shape: [Int], scalarType: Scalar.Type = Scalar.self) where Scalar : MLTensorScalar

Parameters

  • repeatedValue:

    The scalar value to repeat.

  • shape:

    The shape of the tensor.

  • scalarType:

    The scalar type.

See Also

Creating a tensor