ee.Array.not

הפונקציה מחזירה 0 אם הקלט שונה מאפס, ו-1 אחרת.

שימושהחזרות
Array.not()מערך
ארגומנטסוגפרטים
זה: inputמערךמערך הקלט.

דוגמאות

עורך הקוד (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]

הגדרת Python

מידע על Python API ועל שימוש ב-geemap לפיתוח אינטראקטיבי מופיע בדף Python Environment.

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]