How to Solve NameError: name 'loadmat' is not defined -- scipy

Solution: Import the 'loadmat' module

To Solve the error, add the following line to the top of your code.

from scipy.io import loadmat

 

For more information:
Python scipy loadmat