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

  • TheArray.erf() method computes the error function of each element in the input array.

  • This method takes an Array as input and returns an Array as output.

  • Examples are provided in both JavaScript and Python, demonstrating how to use theerf() method and visualize the results.

On an element-wise basis, computes the error function of the input.

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

Examples

Code Editor (JavaScript)

print(ee.Array([-6]).erf());// [-1]print(ee.Array([0]).erf());// [0]print(ee.Array([6]).erf());// [1]varstart=-3;varend=3;varpoints=ee.Array(ee.List.sequence(start,end,null,50));varvalues=points.erf();// Plot erf() 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}]},vAxis:{title:'erf(x)',ticks:[{v:-1},{v:0},{v:1}]},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([-6]).erf())# [-1]display(ee.Array([0]).erf())# [0]display(ee.Array([6]).erf())# [1]start=-3end=3points=ee.Array(ee.List.sequence(start,end,None,50))values=points.erf()df=pd.DataFrame({'x':points.getInfo(),'erf(x)':values.getInfo()})# Plot erf() defined above.alt.Chart(df).mark_line().encode(x=alt.X('x',axis=alt.Axis(values=[start,0,end])),y=alt.Y('erf(x)',axis=alt.Axis(values=[-1,0,1])))

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.