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.cosh

  • TheArray.cosh() method computes the hyperbolic cosine of each element in the input array.

  • This method takes an array as input and returns an array.

On an element-wise basis, computes the hyperbolic cosine of the input.

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

Examples

Code Editor (JavaScript)

print(ee.Array([-4]).cosh());// [~27.31]print(ee.Array([0]).cosh());// [1]print(ee.Array([4]).cosh());// [~27.31]varstart=-4;varend=4;varpoints=ee.Array(ee.List.sequence(start,end,null,50));varvalues=points.cosh();// Plot cosh() defined above.varchart=ui.Chart.array.values(values,0,points).setOptions({viewWindow:{min:start,max:end},hAxis:{title:'x',viewWindowMode:'maximized',ticks:[{v:start},{v:0},{v:end}]},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([-4]).cosh())# [~27.31]display(ee.Array([0]).cosh())# [1]display(ee.Array([4]).cosh())# [~27.31]start=-4end=4points=ee.Array(ee.List.sequence(start,end,None,50))values=points.cosh()df=pd.DataFrame({'x':points.getInfo(),'cosh(x)':values.getInfo()})# Plot cosh() defined above.alt.Chart(df).mark_line().encode(x=alt.X('x',axis=alt.Axis(values=[start,0,end])),y=alt.Y('cosh(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.