Fix label casting for numpy 1.7.