ee.Array.multiply

Multiplica o primeiro valor pelo segundo, elemento por elemento.

UsoRetorna
Array.multiply(right)Matriz
ArgumentoTipoDetalhes
isso: leftMatrizO valor à esquerda.
rightMatrizO valor à direita.

Exemplos

Editor de código (JavaScript)

print(ee.Array([1]).multiply(0));  // [0]
print(ee.Array([1]).multiply(1));  // [1]

print(ee.Array([1]).multiply([0]));  // [0]
print(ee.Array([1]).multiply([1]));  // [1]

// [-1,8,-2,4.8]
print(ee.Array([1, -2, 2, 4]).multiply([-1, -4, -1, 1.2]));

// [-1,2,-2,-3]
print(ee.Array([1, -2, 2, 3]).multiply(-1));

var empty = ee.Array([], ee.PixelType.int8());
print(empty.multiply(empty));  // []

Configuração do Python

Consulte a página Ambiente Python para informações sobre a API Python e como usar geemap para desenvolvimento interativo.

import ee
import geemap.core as geemap

Colab (Python)

display(ee.Array([1]).multiply(0))  # [0]
display(ee.Array([1]).multiply(1))  # [1]

display(ee.Array([1]).multiply([0]))  # [0]
display(ee.Array([1]).multiply([1]))  # [1]

# [-1, 8, -2, 4.8]
display(ee.Array([1, -2, 2, 4]).multiply([-1, -4, -1, 1.2]))

# [-1, 2, -2, -3]
display(ee.Array([1, -2, 2, 3]).multiply(-1))

empty = ee.Array([], ee.PixelType.int8())
display(empty.multiply(empty))  # []