Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ee.Array.log10

  • TheArray.log10() method computes the base-10 logarithm of each element in an input Array.

  • The method returns an Array with the computed base-10 logarithms.

  • The inputthis: input argument is the Array for which the base-10 logarithm is calculated.

On an element-wise basis, computes the base-10 logarithm of the input.

UsageReturns
Array.log10()Array
ArgumentTypeDetails
this:inputArrayThe input array.

Examples

Code Editor (JavaScript)

print(ee.Array([0.1,1,10,100]).log10());// [-1,0,1,2]varstart=0.1;varend=100;varpoints=ee.Array(ee.List.sequence(start,end,null,50));varvalues=points.log10();// Plot log10() defined above.varchart=ui.Chart.array.values(values,0,points).setOptions({viewWindow:{min:start,max:end},hAxis:{title:'x',viewWindowMode:'maximized',},vAxis:{title:'log10(x)',},lineWidth:1,pointSize:0,});print(chart);

Python setup

See the Python Environment page for information on the Python API and usinggeemap for interactive development.

importeeimportgeemap.coreasgeemap

Colab (Python)

importaltairasaltimportpandasaspddisplay(ee.Array([0.1,1,10,100]).log10())# [-1,0,1,2]start=0.1end=100points=ee.Array(ee.List.sequence(start,end,None,50))values=points.log10()df=pd.DataFrame({'x':points.getInfo(),'log10(x)':values.getInfo()})# Plot log10() defined above.alt.Chart(df).mark_line().encode(x=alt.X('x'),y=alt.Y('log10(x)'))

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-10-06 UTC.