eriklindernoren / ML-From-Scratch

Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.
MIT License
23.58k stars 4.55k forks source link

MatplotlibWrapper is an undefined name #23

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

MatplotlibWrapper is an undefined name in gaussian_mixture_model.py and k_means.py. Undefined names can raise NameError at runtime.

flake8 testing of https://github.com/eriklindernoren/ML-From-Scratch on Python 2.7.13

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./mlfromscratch/unsupervised_learning/gaussian_mixture_model.py:137:9: F821 undefined name 'MatplotlibWrapper'
    p = MatplotlibWrapper()
        ^

The same issue is __also present in k_means.py__ but the * import masks it from flake8.

eriklindernoren commented 6 years ago

Thanks. This is fixed in https://github.com/eriklindernoren/ML-From-Scratch/commit/d58485e573f99a86b6033f0cd793d01fb6b423a9