ee.Array.not

Restituisce 0 se l'input è diverso da zero e 1 altrimenti, in base a ogni elemento.

UtilizzoResi
Array.not()Array
ArgomentoTipoDettagli
questo: inputArrayL'array di input.

Esempi

Editor di codice (JavaScript)

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

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

print(ee.Array([-1, -0.1, 0, 0.1, 1]).not());  // [0,0,1,0,0]

Configurazione di Python

Consulta la pagina Ambiente Python per informazioni sull'API Python e sull'utilizzo di geemap per lo sviluppo interattivo.

import ee
import geemap.core as geemap

Colab (Python)

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

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

display(ee.Array([-1, -0.1, 0, 0.1, 1]).Not())  # [0, 0, 1, 0, 0]