Fix for numpy 1.7