Contents

init(repeating:count:)

Creates a new column with a repeating value.

Declaration

init(repeating repeatedValue: MLDataValue, count: Int)

Parameters

  • repeatedValue:

    An initial value for every element in the new column.

  • count:

    The number of elements in the new column.

Discussion

Use this initializer to create a column of repeating elements of a data value.

let dataValueOf5 = MLDataValue.int(5)
let three5s = MLUntypedColumn(repeating: dataValueOf5, count: 3)
print(three5s)
/*
Prints...
 ValueType: Int
 Values:        [5, 5, 5]
 */

See Also

Creating an untyped column