ee.Array.bitwise_or

On an element-wise basis, calculates the bitwise OR of the input values.

UsageReturns
Array.bitwise_or(right)Array
ArgumentTypeDetails
this: leftArray

The left-hand value.

rightArray

The right-hand value.

Examples

JavaScript

var empty = ee.Array([], ee.PixelType.int8());
print(empty.bitwise_or(empty));  // []

print(ee.Array(0).bitwise_or(ee.Array(0)));  // 0
print(ee.Array(0).bitwise_or(ee.Array(1)));  // 1
print(ee.Array(1).bitwise_or(ee.Array(0)));  // 1
print(ee.Array(1).bitwise_or(ee.Array(1)));  // 1

print(ee.Array(0xFF).bitwise_or(ee.Array(0xFFFF)));  // 65535
print(ee.Array(0xFFFF).bitwise_or(ee.Array(0xFF)));  // 65535

print(ee.Array(-1).bitwise_or(ee.Array(0xFF)));  // -1
print(ee.Array(-2).bitwise_or(ee.Array(-3)));  // -1
print(ee.Array(-2).bitwise_or(ee.Array(-4)));  // -2

print(ee.Array([6, 6]).bitwise_or(ee.Array([1, 11])));  // [7,15]

Python

# Your example goes here!