ee.Array.bitwiseNot

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.bitwiseNot()Array
ArgumentTypeDetails
this: inputArray

The input array.

Examples

JavaScript

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

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

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

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

Python

# Your example goes here!