init(repeating:count:)
Creates a new column with a repeating value.
Declaration
init<T>(repeating repeatedValue: T, count: Int) where T : MLDataValueConvertibleParameters
- 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 with any type that conforms to MLDataValueConvertible, including integers, doubles, strings, arrays, and dictionaries.
let three5s = MLUntypedColumn(repeating: 5, count: 3)
print(three5s)
/* Prints...
ValueType: Int
Values: [5, 5, 5]
*/