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 : MLTensorScalarParameters
- repeatedValue:
The scalar value to repeat.
- shape:
The shape of the tensor.
- scalarType:
The scalar type.
See Also
Creating a tensor
init(_:)init(_:alongAxis:)init(_:scalarType:)init(bytesNoCopy:shape:scalarType:deallocator:)init(concatenating:alongAxis:)init(linearSpaceFrom:through:count:)init(linearSpaceFrom:through:count:scalarType:)init(ones:scalarType:)init(randomNormal:mean:standardDeviation:seed:scalarType:)init(randomUniform:in:seed:scalarType:)init(rangeFrom:to:by:)init(rangeFrom:to:by:scalarType:)init(repeating:shape:)init(shape:data:scalarType:)init(shape:scalars:)