ValueError: Contour levels must be increasing

Hello! While running the script by LAKSHAY ARORA (https://www.analyticsvidhya.com/blog/author/lakshayarora/); I encountered a “ValueError: Contour levels must be increasing” resulting from —> 67 plt.contourf(xx, yy, Z, levels=[threshold, Z.max()],colors=‘orange’)
I am not able to proceed as a result of this. How can I solve this issue? Your suggestions will be highly appreciated. Thanks

© Copyright 2013-2020 Analytics Vidhya