Why astype(int)? This should also work with boolean arrays...