Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
ee.Array.not
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
The not() function returns 0 for non-zero inputs and 1 for zero inputs on an element-wise basis.
It operates on an input array and returns an array.
The input must be an Array type.
Examples in JavaScript and Python demonstrate the function's behavior with various array inputs, including an empty array and arrays with zero, non-zero, and a mix of values.
On an element-wise basis, returns 0 if the input is non-zero, and 1 otherwise.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[],["The `not()` method, available for Arrays, checks each element. If an element is non-zero, it's replaced with 0; otherwise, it becomes 1. The method operates element-wise on the input array and returns a new array of the same dimensions. It handles various input values, including negative numbers, decimals, and empty arrays, and works in both JavaScript and Python environments. The output array is a transformed version of the original input array.\n"]]