ee.Array.argmax

यह फ़ंक्शन, किसी अरे में मौजूद सबसे बड़ी वैल्यू की पोज़िशन दिखाता है. यह पोज़िशन, हर अरे ऐक्सिस में इंडेक्स की सूची के तौर पर होती है. अगर अरे खाली है, तो यह फ़ंक्शन शून्य दिखाता है. अगर सबसे बड़ी वैल्यू एक से ज़्यादा बार मौजूद है, तो यह फ़ंक्शन पहली बार मौजूद वैल्यू की पोज़िशन दिखाता है.

इस्तेमालरिटर्न
Array.argmax()सूची
आर्ग्यूमेंटटाइपविवरण
यह: arrayArray

उदाहरण

कोड एडिटर (JavaScript)

// Return the position of the maximum value in each dimension.

// Returns null if the array is empty.
print(ee.Array([], ee.PixelType.int8()).argmax());  // null

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

// Returns the first occurrence of the maximum.
print(ee.Array([1, 1, 1, 9, 9, 9]).argmax());  // [3]

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

# Return the position of the maximum value in each dimension.

# Returns null if the array is empty.
display(ee.Array([], ee.PixelType.int8()).argmax())  # None

display(ee.Array([9]).argmax())  # [0]
display(ee.Array([0, -1, 2, 1]).argmax())  # [2]
display(ee.Array([[3, 4, 2], [6, 5, 7]]).argmax())  # [1, 2]

# Returns the first occurrence of the maximum.
display(ee.Array([1, 1, 1, 9, 9, 9]).argmax())  # [3]