PEP 8 and bugfix when calculating length of pixel array