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 API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

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())