ee.Array.ceil

以元素為單位,計算大於或等於輸入內容的最小整數。

用量傳回
Array.ceil()陣列
引數類型詳細資料
這個:input陣列輸入陣列。

範例

程式碼編輯器 (JavaScript)

// Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8()).ceil());  // []

print(ee.Array([-1.1]).ceil());  // [-1]
print(ee.Array([-0.1]).ceil());  // [0]
print(ee.Array([0]).ceil());  // [0]
print(ee.Array([0.1]).ceil());  // [1]
print(ee.Array([1.1]).ceil());  // [2]

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

Colab (Python)

# Requires an explicit PixelType if no data.
display(ee.Array([], ee.PixelType.int8()).ceil())  # []

display(ee.Array([-1.1]).ceil())  # [-1]
display(ee.Array([-0.1]).ceil())  # [0]
display(ee.Array([0]).ceil())  # [0]
display(ee.Array([0.1]).ceil())  # [1]
display(ee.Array([1.1]).ceil())  # [2]