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

Solution: Import the 'fcluster' module

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

from scipy import fcluster

 

For more information:
Python scipy fcluster