Earth Engine has introduced noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. Noncommercial projects use the Community Tier by default, though you can change a project's tier at any time.
ee.Array.not
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
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.
[null,null,["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"]]