In reply to yakir_mishli:
Use the or reduction method (7.12.3 Array reduction methods).
assign is_one = data.or();