Boolean operations on ICE arrays

While it is true that non-zero values are considered True, this applies only to input values. ICE nodes that return a boolean value will always return either 1 or 0.

Based on this, you can do an element-wise logical operation on array by summing up the array elements.

If the sum is greater than zero, then you know there was at least one True value, so a logical OR would return True. And if the sum was less than the array size, then at least one boolean element is False, so a logical AND would return False.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s