ee.Array.min
On an element-wise basis, selects the minimum of the first and second values.
Usage | Returns |
---|
Array.min(right) | Array |
Argument | Type | Details |
---|
this: left | Array | The left-hand value. |
right | Array | The right-hand value. |
Examples
var empty = ee.Array([], ee.PixelType.int8());
print(empty.min(empty)); // []
print(ee.Array([0, 1, 2, 3]).min(ee.Array([-1, 3, 0, 2]))); // [-1,1,0,2]
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
empty = ee.Array([], ee.PixelType.int8())
display(empty.min(empty)) # []
# [-1, 1, 0, 2]
display(ee.Array([0, 1, 2, 3]).min(ee.Array([-1, 3, 0, 2])))
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`Array.min()` is a function that compares two arrays element-by-element and returns a new array containing the minimum value for each element."],["It takes a single argument, `right`, which is the array to compare against the calling array (`left`)."],["The function returns an empty array if either input array is empty."],["The resulting array has the same dimensions as the input arrays and contains the element-wise minimum values."]]],[]]