Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

2d gaussian function python

import numpy as np

grid_x, grid_y = np.mgrid[-2:2:50j, -2:2:50j]
A = 1 # Gaussian height
x_0, y_0 = 0, 0 # Gaussian centers
sigma_x, sigma_y = 0.5, 0.5

gaussian_2D = A * np.exp(-(((grid_x - x_0)**2 / (2 * sigma_x**2)) + ((grid_y - y_0)**2 / (2 * sigma_y**2))))
Comment

PREVIOUS NEXT
Code Example
Python :: concat columns pandas dataframe 
Python :: create a blank image 
Python :: python scraping 
Python :: python float print 2 digits 
Python :: pyside 
Python :: list all files starting with python 
Python :: % operatior in python print 
Python :: python recursively print directory 
Python :: print elements without print function in python 
Python :: insert data in table python 
Python :: django login view 
Python :: arrange array in ascending order python 
Python :: replace column values/create new column based on another column values/condition in Pandas 
Python :: Origin in CORS_ORIGIN_WHITELIST is missing scheme or netloc 
Python :: pandas data profiling 
Python :: how to unpivot dataframe pandas 
Python :: how to find a word in list python 
Python :: back button django template 
Python :: pdf to csv python 
Python :: replace none with empty string python 
Python :: pyton filter 
Python :: python user input 
Python :: odd or even python 
Python :: python get attributes of object 
Python :: reverse an array pyton 
Python :: dataframe time index convert tz naive to tz aware 
Python :: how to convert boolean type list to integer 
Python :: append dictionary to list python 
Python :: alpha beta pruning python code 
Python :: progress bar in cmd python 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =