ee.Array.max

On an element-wise basis, selects the maximum of the first and second values.

UsageReturns
Array.max(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.max(empty));  // []

var array1 = ee.Array([0, -3, 5, 3]);
var array2 = ee.Array([0, -1, 2, 4]);
print(array1.max(array2));  // [0,-1,5,4]

Python

# Your example goes here!