Why does this order of the Gaussian filter in scipy give the x and y derivative?
Why does this order of the Gaussian filter in scipy give the x and y derivative? I'm using a Gaussian filter with Scipy and I saw this code online which I'm curious about. imx = zeros(im.shape) filters.gaussian_filter(im, (sigma,sigma), (0,1), imx) imy = zeros(im.shape) filters.gaussian_filter(im, (sigma,sigma), (1,0), imy) For the first Gaussian filter call, the order is (0,1) and according to this link, that should give the the first order derivative of a Gaussian in y-direction. However, on running the code, I can see that the Gaussian is along the X direction. The same thing applies to imy. Why does the code work that way? For reference, running: filters.gaussian_filter(im, (sigma, sigma), (0, 1), output= imx) on this array: [[0 3 2] [1 4 1] [3 4 2]] Returns: [[0.00071801 0.00148952 0.00077151] [0.0006947 0.00144284 0.00074815] [0.00067141 0.00139622 0.00072482]] Which is a Gaussian in the x direction, even though the order (0, 1) suggests that it should be in the y dire...