ee.Array.subtract

On an element-wise basis, subtracts the second value from the first.

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

The left-hand value.

rightArray

The right-hand value.

Examples

JavaScript

print(ee.Array([10]).subtract(1));  // [9]

print(ee.Array([-1, 0, 1]).subtract(2));  // [-3,-2,-1]
print(ee.Array([-1, 0, 1]).subtract([-5, 6, 7]));  // [4,-6,-6]

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

Python

# Your example goes here!