Change .view to .astype to fix tests on python 2.7.5 and numpy 1.8.1