Improved performance of H-S algorithm implementation

Replaced a loop by a numpy operation. Around 15% speedup on
plot_adhd_covariance2.py with 40 subjects.