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

Solution: Import the 'chisquare' module

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

from scipy.stats import chisquare

 

For more information:
Python scipy chisquare