ee.Array.cbrt

以元素為單位,計算輸入值的立方根。

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

範例

程式碼編輯器 (JavaScript)

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

print(ee.Array([0]).cbrt());  // [0]
print(ee.Array([27]).cbrt());  // [3]
print(ee.Array([-27]).cbrt());  // -3

print(ee.Array([0, 1, 8, 27]).cbrt());  // [0,1,2,3]
print(ee.Array([[0, 1, 8], [27, 64, 125]]).cbrt());  // [[0,1,2],[3,4,5]]

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()).cbrt())  # []

display(ee.Array([0]).cbrt())  # [0]
display(ee.Array([27]).cbrt())  # [3]
display(ee.Array([-27]).cbrt())  # -3

display(ee.Array([0, 1, 8, 27]).cbrt())  # [0, 1, 2, 3]

# [[0, 1, 2], [3, 4, 5]]
display(ee.Array([[0, 1, 8], [27, 64, 125]]).cbrt())