1

I am converting a datafile from matlab to python and am running into issues involving smoothing a dataset. Say I have an array of data A defined as follows:

A = np.array([[0,0,1,0,1,0],
[1,0,0,1,1,0],
[1,1,1,0,0,0]])

In matlab there is a built in function to smooth this to a Gaussian curve. In the code I am translating, it is defined as follows:

n_data = 200.0
smthdat = smoothdata(A, 2, 'gaussian', n_data)*n_data;

However I am running into issues with getting this function to work in python. Importantly, I am working with a set of data rather than a single value, so functions like scipy.signal.gaussian() will not work here. Any ideas? Thank you.

PurpleSky
  • 111
  • 5

0 Answers0