PEP8/pyflakes warnings.
Make scaling work properly with sparse 1D data.