ee.Array.bitwise_not

On an element-wise basis, calculates the bitwise NOT of the input, in the smallest signed integer type that can hold the input.

UsageReturns
Array.bitwise_not()Array
ArgumentTypeDetails
this: inputArray

The input array.

Examples

JavaScript

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

print(ee.Array(0).bitwise_not());  // -1
print(ee.Array(1).bitwise_not());  // -2
print(ee.Array(0xFF).bitwise_not());  // -256

print(ee.Array(-1).bitwise_not());  // 0
print(ee.Array(-2).bitwise_not());  // 1
print(ee.Array(-3).bitwise_not());  // 2

print(ee.Array(0xFF).toInt64().bitwise_not());  // -256

Python

# Your example goes here!