ee.Array.ceil
On an element-wise basis, computes the smallest integer greater than or equal to the input.
Usage | Returns |
---|
Array.ceil() | Array |
Argument | Type | Details |
---|
this: input | Array | The input array. |
Examples
// Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8()).ceil()); // []
print(ee.Array([-1.1]).ceil()); // [-1]
print(ee.Array([-0.1]).ceil()); // [0]
print(ee.Array([0]).ceil()); // [0]
print(ee.Array([0.1]).ceil()); // [1]
print(ee.Array([1.1]).ceil()); // [2]
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
# Requires an explicit PixelType if no data.
display(ee.Array([], ee.PixelType.int8()).ceil()) # []
display(ee.Array([-1.1]).ceil()) # [-1]
display(ee.Array([-0.1]).ceil()) # [0]
display(ee.Array([0]).ceil()) # [0]
display(ee.Array([0.1]).ceil()) # [1]
display(ee.Array([1.1]).ceil()) # [2]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`Array.ceil()` computes the smallest integer greater than or equal to each element in the input array."],["The function returns a new array with the ceiling values of the original elements."],["It operates on an element-wise basis, meaning it applies the ceiling operation to each individual element of the input array."],["If the input is an empty array, it returns an empty array."]]],["The `ceil()` method computes the ceiling of each element in an input array, returning a new array. The function determines the smallest integer greater than or equal to each input element. It operates element-wise. If the input array is empty, an explicit PixelType is required. The input array can contain positive and negative numbers, as shown with the provided examples. `Array.ceil()` method returns a new Array.\n"]]