Using ndimage.gaussian_filter for 3d array

"ashwin .D" <[email protected]> Tue, 26 Oct 2021 15:29:18 +0530
Newsgroups gmane.comp.python.scientific.user
Message-ID <CAH0LXy76Zx1Cks6ed2cNsqQAVReomVkS9mcF8Bx=V5CCd7zhAA@mail.gmail.com>
Hello,
             I am wanting to use ndimage.gaussian_filter for a 3d array in
order to smooth the data .

When I do this -

abc[:,:,:] = ndimage.gaussian_filter(abc[:,:,:]*1e2,sigma=2,order=0) I get
unreal values.

However the function call when done within a loop like this

for k in range(0,N):
     abc[k,:,:] = ndimage.gaussian_filter(abc[k,:,:]*1e2,sigma=2,order=0)
gives reasonable smoothed values.

From the docs -
https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.gaussian_filter.html

the input array does not seem to have any restriction on the dimensionality
. So where am I going wrong ?

Best regards,
Ashwin.

_______________________________________________
SciPy-User mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-user.python.org/
Member address: [email protected]