ee.Array.not

On an element-wise basis, returns 0 if the input is non-zero, and 1 otherwise.

UsageReturns
Array.not()Array
ArgumentTypeDetails
this: inputArray

The input array.

Examples

JavaScript

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

print(ee.Array([0]).not());  // [1]
print(ee.Array([1]).not());  // [0]

print(ee.Array([-1, -0.1, 0, 0.1, 1]).not());  // [0,0,1,0,0]

Python

# Your example goes here!