Earth Engine is introducingnoncommercial quota tiersto safeguard shared compute resources and ensure reliable performance for everyone. All noncommercial projects will need to select a quota tier byApril 27, 2026or will use the Community Tier by default. Tier quotas will take effect for all projects (regardless of tier selection date) onApril 27, 2026.Learn more.
ee.Array.argmaxStay organized with collectionsSave and categorize content based on your preferences.
Page Summary
Theargmax()function returns the position of the maximum value in an array as a list of indices.
If the array is empty,argmax()returns null.
If there are multiple occurrences of the maximum value,argmax()returns the position of the first occurrence.
Returns the position, as a list of indices in each array axis, of the maximum value in an array, or null if the array is empty. If there are multiple occurrences of the maximum, returns the position of the first.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[],["The `argmax()` function finds the position of the maximum value within an array. It returns a list of indices, representing the location in each array dimension. If the array is empty, it returns null. In cases of multiple maximum values, it returns the index of the first occurrence. Usage is `Array.argmax()`, and it takes one array argument. Examples illustrate its behavior with empty, single-value, multi-value, and multi-dimensional arrays.\n"]]