ee.Array.not

ในระดับองค์ประกอบ จะแสดงผลเป็น 0 หากอินพุตไม่ใช่ 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

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]