ee.Number.not

แสดงผล 0 หากอินพุตไม่ใช่ 0 และแสดงผล 1 ในกรณีอื่นๆ

การใช้งานการคืนสินค้า
Number.not()ตัวเลข
อาร์กิวเมนต์ประเภทรายละเอียด
ดังนี้ inputตัวเลขค่าอินพุต

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

print('Value is not 0', ee.Number(5).not());  // 0
print('Value is 0', ee.Number(0).not());  // 1

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

print('Value is not 0:', ee.Number(5).Not().getInfo())  # 0
print('Value is 0:', ee.Number(0).Not().getInfo())  # 1