Skip to content

Instantly share code, notes, and snippets.

@angeloped
Created June 18, 2022 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angeloped/f8fe6852ec1ddbfce2b380fb2011be6b to your computer and use it in GitHub Desktop.
Save angeloped/f8fe6852ec1ddbfce2b380fb2011be6b to your computer and use it in GitHub Desktop.
Python implementation of Gaussian function.
# https://en.wikipedia.org/wiki/Gaussian_function
def gaussian_func(x, a, std_dvtn, mean):
e = 2.718281828459045 # euler's const
return (a*e) ** -(((x-mean)**2) / (2*std_dvtn)**2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment