[SciPy-user] Creating a 2D matrix with a gausian hump?
Gerald Richter
richter at hephy.oeaw.ac.at
Thu Jun 22 10:52:34 EDT 2006
Hi Jim,
I attached some code that does something like this. It has been a while
since I wrote it, and I did that for a more general case.
If you need the code to do some convolution, don't forget to normalize the
kernel ;) (-this is why I needed the second function)
- Hope you can at least grab some ideas from it...
regards,
Gerald.
On Thu, Jun 22, 2006 at 09:37:20AM -0400, James Carroll wrote:
> Hi,
>
> What's a good way to create a 2d gaussian kernel with numpy?
>
> I'm trying to create a 9x9 matrix with 1.0 in the center, and 0.0 in
> the corners, and a gaussian distribution from the center out.
>
> Thanks,
> -Jim
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
--
Gerald Richter
More information about the SciPy-User
mailing list