pep8 + pyflakes, use arrays for errors_ and weights_