The other function returns an npy_intp (it is known to be safe though). There certainly is already a cast due to the return value, not sure if compilers may warn about it without the cast. I will trust your style feeling :)