I am currently taking a Neural Network course, and I am trying to load a .mat file from Python using scipy.io.loadmat(filename), but I keep getting
You cannot load .m script-files. These are MATLAB's own script-files and they contain MATLAB code. The function scipy.io.loadmat cannot parse this code.
On the other hand, the function can load data from a MATLAB .mat-file. This is MATLAB's own data-format within which you store variables and data - but not code.
Reference: https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html.