ee.Array.get

Extracts the value at the given position from the input array.

UsageReturns
Array.get(position)Number
ArgumentTypeDetails
this: arrayArray

The array to extract from.

positionList

The coordinates of the element to get.

Examples

JavaScript

print(ee.Array([9]).get([0]));  // 9
print(ee.Array([8, 7, 6]).get([2]));  // 6

var array = ee.Array([[0, 1, 2], [3, 4, 5]]);
print(array.get([0, 0]));  // 0
print(array.get([0, 1]));  // 1
print(array.get([1, 0]));  // 3
print(array.get([1, 2]));  // 5

Python

# Your example goes here!