boolArray function

bool[] boolArray()
bool[] boolArray(values)

values float[]bool[]string[] Values to convert.

Returns an empty bool array if values is not given. Otherwise, returns the values converted element-wise to boolean.

Related

Examples

boolArray([1, 0, 1, 20])
# result = [true,false,true,true]

boolArray(["true", "1", "0", "f", "false", "schwiizer nati"])
# result = [true,true,false,false,false,true]

boolArray([true, false, true])
# result = [true,false,true]