BUGFIX: folds and unfolds variance as expected
added tests
Automatic style corrections courtesy of autopep8
Merge pull request #235 from to266/BUG_fold_variance

Bug: fold variance too, when folding signal