How to calculate a Gaussian kernel matrix efficiently in numpy?
Do you want to use the Gaussian kernel for e.g. image smoothing? If so, there’s a function gaussian_filter() in scipy: Updated answer This should work – while it’s still not 100% accurate, it attempts to account for the probability mass within each cell of the grid. I think that using the probability density at the … Read more